← all repositories
ahmadfaizalbh/Chatbot

A chatbot framework that grew an LLM backbone

Pattern-matching templates plus a local Llama 3.2 fallback for when regex isn't enough.

866 stars Python Chat AssistantsAgents
Chatbot
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

ChatBotAI is a Python library for building rule-based chatbots with minimal code. You define conversations in template files using regex patterns, memory variables, topic switching, and Python function hooks. If no template matches, it falls back to an Ollama-powered Llama 3.2 model running locally.

The interesting bit

The project started as classic pattern-matching glue (think ELIZA with JSON APIs) and recently bolted on a full LLM backend. The template engine is surprisingly capable—recursion, conditionals, REST API integration via JSON configs, and dynamic learning blocks—making it a halfway house between rigid bot frameworks and open-ended generative AI.

Key highlights

  • Template-driven responses with regex, memory, and topic groups
  • Direct Python function calls via @register_call decorators
  • REST API integration through a JSON configuration file
  • Local Llama 3.2 inference via Ollama with no API costs
  • Self-learning: teach the bot specific responses on the fly

Caveats

  • The README has duplicated/fragmented sections and broken image links, suggesting maintenance has been uneven
  • The Ollama integration is new enough that edge cases around template-LLM handoffs aren’t deeply documented
  • “No training required” only applies to the LLM fallback; the template system still needs you to write patterns

Verdict

Worth a look if you need a lightweight Python chatbot with structured flows and an escape hatch to generative AI. Skip it if you want a pure LLM solution or a polished, batteries-included platform.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.