From f5b62084149c08f574998f35136e8419d7b9dd15 Mon Sep 17 00:00:00 2001 From: imilev Date: Sat, 28 Jun 2025 23:34:59 +0300 Subject: [PATCH 01/18] Added high-level diagrams --- .codeboarding/ChatBot.md | 267 +++++++++++++++++++++++++++++++ .codeboarding/LogicAdapter.md | 179 +++++++++++++++++++++ .codeboarding/Statement.md | 199 +++++++++++++++++++++++ .codeboarding/StorageAdapter.md | 269 ++++++++++++++++++++++++++++++++ .codeboarding/Trainer.md | 149 ++++++++++++++++++ .codeboarding/on_boarding.md | 183 ++++++++++++++++++++++ 6 files changed, 1246 insertions(+) create mode 100644 .codeboarding/ChatBot.md create mode 100644 .codeboarding/LogicAdapter.md create mode 100644 .codeboarding/Statement.md create mode 100644 .codeboarding/StorageAdapter.md create mode 100644 .codeboarding/Trainer.md create mode 100644 .codeboarding/on_boarding.md diff --git a/.codeboarding/ChatBot.md b/.codeboarding/ChatBot.md new file mode 100644 index 000000000..2db4b8ebb --- /dev/null +++ b/.codeboarding/ChatBot.md @@ -0,0 +1,267 @@ +```mermaid + +graph LR + + ChatterBot["ChatterBot"] + + StorageAdapter["StorageAdapter"] + + LogicAdapter["LogicAdapter"] + + Statement["Statement"] + + Preprocessors["Preprocessors"] + + Search["Search"] + + Tagger["Tagger"] + + Trainer["Trainer"] + + ResponseSelection["ResponseSelection"] + + Corpus["Corpus"] + + ChatterBot -- "initializes" --> StorageAdapter + + ChatterBot -- "initializes" --> LogicAdapter + + ChatterBot -- "processes" --> Statement + + ChatterBot -- "applies" --> Preprocessors + + ChatterBot -- "uses" --> Search + + ChatterBot -- "uses" --> Tagger + + StorageAdapter -- "manages" --> Statement + + LogicAdapter -- "generates" --> Statement + + LogicAdapter -- "uses" --> StorageAdapter + + LogicAdapter -- "uses" --> Search + + LogicAdapter -- "uses" --> ResponseSelection + + Trainer -- "trains" --> ChatterBot + + Trainer -- "populates" --> StorageAdapter + + Trainer -- "uses" --> Corpus + + Search -- "queries" --> StorageAdapter + + Search -- "uses" --> Tagger + + Preprocessors -- "transforms" --> Statement + + ResponseSelection -- "selects" --> Statement + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + + click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + + click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +ChatterBot Subsystem: A detailed overview of its internal structure, operational flow, and pivotal role within the conversational AI system, including its relationships with other fundamental components. + + + +### ChatterBot + +The central orchestrator of the conversational AI. It initializes and integrates all other core components, manages the flow of interaction, processes user input, and coordinates the selection or generation of responses. It is the primary interface for interacting with the chatbot. + + + + + +**Related Classes/Methods**: + + + +- `ChatterBot` (0:0) + + + + + +### StorageAdapter + +This abstract base class serves as the blueprint for all data storage and retrieval operations within ChatterBot. It provides a standardized interface for managing conversational data (statements, responses, etc.), allowing different storage backends (e.g., SQL, NoSQL) to be plugged in seamlessly. Its methods are primarily designed to be overridden by concrete implementations. + + + + + +**Related Classes/Methods**: + + + +- `StorageAdapter` (3:178) + + + + + +### LogicAdapter + +An abstract base class that defines the interface for all logic adapters. Logic adapters are responsible for processing input statements and generating appropriate responses based on various algorithms and rules. Concrete implementations provide specific conversational behaviors. + + + + + +**Related Classes/Methods**: + + + +- `LogicAdapter` (9:135) + + + + + +### Statement + +A model class representing a conversational statement, fundamental for storing and retrieving conversational data within ChatterBot. Each `Statement` object encapsulates the text of a statement, its associated responses, and other metadata. + + + + + +**Related Classes/Methods**: + + + +- `Statement` (0:0) + + + + + +### Preprocessors + +A collection of functions that modify or clean input statements before they are processed by the chatbot's logic adapters. This can include tasks like converting text to lowercase, removing punctuation, or stemming words. + + + + + +**Related Classes/Methods**: + + + +- `Preprocessors` (0:0) + + + + + +### Search + +Provides mechanisms for searching and retrieving statements from the chatbot's knowledge base, often used by logic adapters to find matching input statements or potential responses. + + + + + +**Related Classes/Methods**: + + + +- `Search` (0:0) + + + + + +### Tagger + +Responsible for linguistic processing, such as part-of-speech tagging and lemmatization, to create indexed representations of text for efficient searching and comparison. + + + + + +**Related Classes/Methods**: + + + +- `Tagger` (0:0) + + + + + +### Trainer + +Manages the training process of the chatbot, enabling it to learn from various data sources like conversational corpora or lists of statements. It populates the chatbot's knowledge base, typically by interacting with the `StorageAdapter`. + + + + + +**Related Classes/Methods**: + + + +- `Trainer` (0:0) + + + + + +### ResponseSelection + +A component responsible for selecting the most appropriate response from a list of candidate responses generated by logic adapters. It often employs various algorithms to score and rank responses. + + + + + +**Related Classes/Methods**: + + + +- `ResponseSelection` (0:0) + + + + + +### Corpus + +Manages the loading and processing of conversational corpora, which are structured datasets used to train the chatbot. It provides methods to access and iterate over training data. + + + + + +**Related Classes/Methods**: + + + +- `Corpus` (0:0) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/LogicAdapter.md b/.codeboarding/LogicAdapter.md new file mode 100644 index 000000000..6055804b1 --- /dev/null +++ b/.codeboarding/LogicAdapter.md @@ -0,0 +1,179 @@ +```mermaid + +graph LR + + LogicAdapter["LogicAdapter"] + + ChatterBot["ChatterBot"] + + Statement["Statement"] + + StorageAdapter["StorageAdapter"] + + BestMatch["BestMatch"] + + IndexedTextSearch["IndexedTextSearch"] + + get_first_response["get_first_response"] + + Adapter["Adapter"] + + LogicAdapter -- "inherits from" --> Adapter + + LogicAdapter -- "processes" --> Statement + + ChatterBot -- "uses" --> LogicAdapter + + ChatterBot -- "provides" --> StorageAdapter + + Statement -- "is stored by" --> StorageAdapter + + StorageAdapter -- "provides data to" --> LogicAdapter + + StorageAdapter -- "manages" --> Statement + + BestMatch -- "inherits from" --> LogicAdapter + + BestMatch -- "utilizes" --> IndexedTextSearch + + IndexedTextSearch -- "is used by" --> LogicAdapter + + IndexedTextSearch -- "queries" --> StorageAdapter + + get_first_response -- "is employed by" --> LogicAdapter + + get_first_response -- "receives" --> Statement + + click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + + click Adapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Adapter.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +The LogicAdapter subsystem forms the "brain" of the ChatterBot, encapsulating the core conversational logic. It defines how the chatbot processes input statements, determines a suitable response, and assigns a confidence score to that response. This modular design allows for various conversational strategies to be implemented and selected based on the context. + + + +### LogicAdapter + +This is an abstract base class that defines the interface and core functionality for all logic adapters. It provides methods like `can_process` (to determine if an adapter can handle a given statement) and `process` (to generate a response). It also manages the selection of search algorithms and response selection methods. + + + + + +**Related Classes/Methods**: + + + +- `LogicAdapter:can_process` (79:86) + +- `LogicAdapter:process` (88:105) + +- `Adapter:__init__` (0:0) + + + + + +### ChatterBot + +The main chatbot instance that orchestrates the entire conversational flow. It initializes and utilizes various `LogicAdapter` instances to process user input, select the best response based on confidence scores, and interact with the storage layer. + + + + + +**Related Classes/Methods**: _None_ + + + +### Statement + +Represents a single conversational unit, such as a sentence or phrase. `Statement` objects are the primary data structure passed between the `ChatterBot`, `LogicAdapter` instances, and `StorageAdapter` for processing, searching, and storing conversational data. + + + + + +**Related Classes/Methods**: _None_ + + + +### StorageAdapter + +An abstract class defining the interface for interacting with the chatbot's underlying data store. Logic adapters rely on the `StorageAdapter` to retrieve past conversations, find matching statements, and store new ones. It provides methods for filtering, creating, updating, and retrieving statements. + + + + + +**Related Classes/Methods**: _None_ + + + +### BestMatch + +A concrete implementation of `LogicAdapter` that specializes in finding the best possible response by comparing the input statement to known statements in the database. It leverages a search algorithm to identify the closest match and then selects an appropriate response from associated statements. + + + + + +**Related Classes/Methods**: _None_ + + + +### IndexedTextSearch + +A search algorithm used by logic adapters (like `BestMatch`) to efficiently find statements in the database that are similar to a given input. It interacts with the `StorageAdapter` to retrieve potential matches and then uses a comparison function to determine confidence scores. + + + + + +**Related Classes/Methods**: _None_ + + + +### get_first_response + +A utility function that serves as a default response selection method. When a logic adapter has identified multiple potential responses, this method simply selects the first one from the list. It's a basic strategy that can be overridden by more sophisticated selection methods. + + + + + +**Related Classes/Methods**: _None_ + + + +### Adapter + +A base class from which other components, such as LogicAdapter, inherit, providing common initialization and utility. + + + + + +**Related Classes/Methods**: _None_ + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Statement.md b/.codeboarding/Statement.md new file mode 100644 index 000000000..85365b709 --- /dev/null +++ b/.codeboarding/Statement.md @@ -0,0 +1,199 @@ +```mermaid + +graph LR + + Statement["Statement"] + + ChatterBot["ChatterBot"] + + StorageAdapter["StorageAdapter"] + + LogicAdapter["LogicAdapter"] + + Trainer["Trainer"] + + PreProcessor["PreProcessor"] + + StatementComparator["StatementComparator"] + + Statement -- "is processed by" --> ChatterBot + + Statement -- "is stored by" --> StorageAdapter + + ChatterBot -- "processes" --> Statement + + ChatterBot -- "uses" --> LogicAdapter + + StorageAdapter -- "stores/retrieves" --> Statement + + StorageAdapter -- "is used by" --> ChatterBot + + LogicAdapter -- "processes" --> Statement + + LogicAdapter -- "uses" --> StatementComparator + + Trainer -- "trains with" --> Statement + + Trainer -- "uses" --> StorageAdapter + + PreProcessor -- "modifies" --> Statement + + PreProcessor -- "is applied by" --> ChatterBot + + StatementComparator -- "compares" --> Statement + + StatementComparator -- "is used by" --> LogicAdapter + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + + click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" + + click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +An overview of the `Statement` component within the `chatterbot` project, detailing its structure, purpose, and interactions with other core components. + + + +### Statement + +The Statement class serves as the fundamental data structure for representing a single unit of conversation within ChatterBot. It encapsulates the text of an utterance, along with crucial metadata such as its unique identifier (`id`), the conversation it belongs to (`conversation`), the persona who uttered it (`persona`), associated tags (`tags`), and a reference to the statement it is in response to (`in_response_to`). It also includes a `confidence` score (set when the statement is a bot's response) and a `created_at` timestamp. `Statement` objects are the primary means of data exchange and processing across all core components of ChatterBot, enabling the system to store, retrieve, process, respond to, and learn from conversational data. + + + + + +**Related Classes/Methods**: + + + +- `Statement` (1:1) + + + + + +### ChatterBot + +The main orchestrator of the chatbot. It manages the entire conversational flow, from receiving user input to selecting and generating responses. It utilizes various adapters and processors, all of which operate on `Statement` objects. + + + + + +**Related Classes/Methods**: + + + +- `ChatterBot` (1:1) + + + + + +### StorageAdapter + +An abstract base class defining the interface for storing and retrieving `Statement` objects. Concrete implementations (e.g., `SQLStorageAdapter`, `MongoDatabaseAdapter`) handle the actual database interactions. The `Statement.save()` method directly interacts with an instance of this adapter. + + + + + +**Related Classes/Methods**: + + + +- `StorageAdapter` (3:178) + + + + + +### LogicAdapter + +An abstract base class for components that define the chatbot's response logic. Each `LogicAdapter` takes an input `Statement` and returns a response `Statement` (or a confidence score for a potential response). + + + + + +**Related Classes/Methods**: + + + +- `LogicAdapter` (9:135) + + + + + +### Trainer + +An abstract base class for components responsible for training the chatbot. Trainers typically take lists of `Statement` objects (conversational data) and use them to populate the chatbot's knowledge base via the `StorageAdapter`. + + + + + +**Related Classes/Methods**: + + + +- `Trainer` (1:1) + + + + + +### PreProcessor + +An abstract base class for functions that modify an input `Statement` before it is processed by `LogicAdapter`s. Examples include converting text to lowercase or removing punctuation. + + + + + +**Related Classes/Methods**: + + + +- `PreProcessor` (1:1) + + + + + +### StatementComparator + +An abstract base class for functions that compare two `Statement` objects and return a numerical value indicating their similarity or confidence. These are crucial for `LogicAdapter`s to find the best match for an input. + + + + + +**Related Classes/Methods**: + + + +- `StatementComparator` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/StorageAdapter.md b/.codeboarding/StorageAdapter.md new file mode 100644 index 000000000..11718308b --- /dev/null +++ b/.codeboarding/StorageAdapter.md @@ -0,0 +1,269 @@ +```mermaid + +graph LR + + StorageAdapter["StorageAdapter"] + + Statement["Statement"] + + MongoDatabaseAdapter["MongoDatabaseAdapter"] + + SQLStorageAdapter["SQLStorageAdapter"] + + DjangoStorageAdapter["DjangoStorageAdapter"] + + RedisStorageAdapter["RedisStorageAdapter"] + + ChatterBot["ChatterBot"] + + LogicAdapter["LogicAdapter"] + + SQLAlchemyAppModels["SQLAlchemyAppModels"] + + VectorStores["VectorStores"] + + StorageAdapter -- "defines interface for" --> Statement + + MongoDatabaseAdapter -- "implements" --> StorageAdapter + + SQLStorageAdapter -- "implements" --> StorageAdapter + + DjangoStorageAdapter -- "implements" --> StorageAdapter + + RedisStorageAdapter -- "implements" --> StorageAdapter + + MongoDatabaseAdapter -- "manages" --> Statement + + SQLStorageAdapter -- "manages" --> Statement + + DjangoStorageAdapter -- "manages" --> Statement + + RedisStorageAdapter -- "manages" --> Statement + + ChatterBot -- "uses" --> StorageAdapter + + LogicAdapter -- "queries" --> StorageAdapter + + SQLStorageAdapter -- "uses" --> SQLAlchemyAppModels + + RedisStorageAdapter -- "uses" --> VectorStores + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + + click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +The `StorageAdapter` subsystem is fundamental to ChatterBot's ability to learn and maintain context by abstracting how conversational data is stored and retrieved. This design allows ChatterBot to be flexible with its backend database, supporting various storage solutions without altering the core logic. + + + +### StorageAdapter + +This is the abstract base class that defines the contract for all storage mechanisms within ChatterBot. It specifies the essential methods (e.g., `count`, `remove`, `filter`, `create`, `update`, `get_random`, `drop`) that any concrete storage adapter must implement to persist and retrieve `Statement` objects. Its purpose is to decouple the core chatbot logic from the underlying database technology. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) + +- `chatterbot.storage.storage_adapter.StorageAdapter:count` (56:62) + +- `chatterbot.storage.storage_adapter.StorageAdapter:remove` (64:72) + +- `chatterbot.storage.storage_adapter.StorageAdapter:filter` (74:123) + +- `chatterbot.storage.storage_adapter.StorageAdapter:create` (125:132) + +- `chatterbot.storage.storage_adapter.StorageAdapter:update` (142:149) + +- `chatterbot.storage.storage_adapter.StorageAdapter:get_random` (151:157) + +- `chatterbot.storage.storage_adapter.StorageAdapter:drop` (159:165) + + + + + +### Statement + +The core data model representing a single conversational utterance. A `Statement` object encapsulates the text of a user's input or the bot's response, along with metadata such as `in_response_to` (linking it to previous statements) and `tags`. It is the primary entity that `StorageAdapter` implementations are designed to store and retrieve. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.conversation.statement.Statement` (61:117) + + + + + +### MongoDatabaseAdapter + +These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.mongodb.MongoDatabaseAdapter` (5:249) + + + + + +### SQLStorageAdapter + +These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.sql_storage.SQLStorageAdapter` (4:408) + + + + + +### DjangoStorageAdapter + +These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.django_storage.DjangoStorageAdapter` (4:218) + + + + + +### RedisStorageAdapter + +These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.redis.RedisStorageAdapter` (1:1) + + + + + +### ChatterBot + +The main application class that orchestrates the entire chatbot's functionality. It initializes and utilizes a specific `StorageAdapter` instance to manage the bot's conversational data. It relies on the storage adapter to load existing knowledge, save new interactions, and retrieve statements for processing. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.chatterbot.ChatterBot` (1:1) + + + + + +### LogicAdapter + +Components responsible for processing user input and generating appropriate responses. `LogicAdapter`s frequently query the `StorageAdapter` to retrieve relevant `Statement` objects from the bot's knowledge base, which are then used to determine the best possible response. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.logic.logic_adapter.LogicAdapter` (9:135) + + + + + +### SQLAlchemyAppModels + +This module contains the SQLAlchemy ORM models (e.g., `Statement`, `Response`) that define the database schema for relational databases. These models are specifically used by the `SQLStorageAdapter` to map Python objects to database tables and facilitate data persistence. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.ext.sqlalchemy_app.models` (1:1) + + + + + +### VectorStores + +This module likely provides functionalities for storing and querying vector embeddings of text, which can be used for semantic search or similarity matching. The `RedisStorageAdapter` leverages this for advanced data retrieval, especially when dealing with large datasets or requiring efficient similarity-based lookups. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.vectorstores` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Trainer.md b/.codeboarding/Trainer.md new file mode 100644 index 000000000..1744cfdc4 --- /dev/null +++ b/.codeboarding/Trainer.md @@ -0,0 +1,149 @@ +```mermaid + +graph LR + + Trainer["Trainer"] + + ChatBot["ChatBot"] + + Statement["Statement"] + + PreProcessor["PreProcessor"] + + StorageAdapter["StorageAdapter"] + + Trainer -- "uses" --> ChatBot + + Trainer -- "processes" --> Statement + + Trainer -- "applies" --> PreProcessor + + Trainer -- "interacts with" --> StorageAdapter + + click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" + + click ChatBot href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//ChatBot.md" "Details" + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +The `Trainer` subsystem in ChatterBot is responsible for managing the process of teaching the chatbot new conversational patterns. It provides a foundational structure for various training methods, allowing the chatbot to learn from diverse data sources. + + + +### Trainer + +This is the abstract base class for all training methods. It provides common functionalities such as initializing with a `ChatBot` instance, preprocessing input statements, and exporting conversational data for training. Its `train` method is abstract and must be implemented by concrete trainer classes. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.trainers.Trainer` (13:76) + +- `chatterbot.trainers.Trainer:train` (42:46) + +- `chatterbot.chatterbot.ChatBot` (12:360) + +- `chatterbot.preprocessors.PreProcessor` (0:0) + +- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) + +- `chatterbot.conversation.statement.Statement` (61:117) + + + + + +### ChatBot + +The central instance of the chatbot. The `Trainer` interacts directly with the `ChatBot` to access its `StorageAdapter` (for data persistence) and `PreProcessor` instances (for input preparation). + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.chatterbot.ChatBot` (12:360) + + + + + +### Statement + +Represents a single unit of conversational data, typically an input or a response. The `Trainer` processes and manipulates `Statement` objects during preprocessing and data export. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.conversation.statement.Statement` (61:117) + + + + + +### PreProcessor + +A callable object (or function) responsible for modifying or cleaning input statements before they are processed or stored. The `Trainer` applies these preprocessors to incoming statements. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.preprocessors.PreProcessor` (0:0) + + + + + +### StorageAdapter + +Manages the persistence and retrieval of conversational data (statements) for the chatbot. The `Trainer` uses the `StorageAdapter` to access existing conversations for export. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/on_boarding.md b/.codeboarding/on_boarding.md new file mode 100644 index 000000000..f8bfa78dd --- /dev/null +++ b/.codeboarding/on_boarding.md @@ -0,0 +1,183 @@ +```mermaid + +graph LR + + ChatBot["ChatBot"] + + StorageAdapter["StorageAdapter"] + + LogicAdapter["LogicAdapter"] + + Trainer["Trainer"] + + Statement["Statement"] + + LLM["LLM"] + + ChatBot -- "Orchestrates" --> LogicAdapter + + ChatBot -- "Manages" --> StorageAdapter + + ChatBot -- "Utilizes" --> Trainer + + ChatBot -- "Interacts with" --> LLM + + ChatBot -- "Processes" --> Statement + + StorageAdapter -- "Stores" --> Statement + + StorageAdapter -- "Provides data to" --> ChatBot + + LogicAdapter -- "Processes" --> Statement + + LogicAdapter -- "Provides responses to" --> ChatBot + + Trainer -- "Trains" --> ChatBot + + Trainer -- "Populates" --> StorageAdapter + + Statement -- "Is processed by" --> LogicAdapter + + Statement -- "Is stored by" --> StorageAdapter + + LLM -- "Generates responses from" --> Statement + + LLM -- "Integrated with" --> ChatBot + + click ChatBot href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//ChatBot.md" "Details" + + click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" + + click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" + + click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" + + click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" + +``` + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Component Details + + + +These six components are chosen as fundamental because they represent the essential functional blocks required for any conversational AI system like ChatterBot: ChatBot (entry point and central control unit), StorageAdapter (memory and persistence), LogicAdapter (the "brain" or intelligence), Trainer (learning mechanism), Statement (universal data structure), and LLM (generative capabilities). + + + +### ChatBot + +The central orchestrator of the conversational AI. It initializes and integrates all other core components, manages the flow of interaction, processes user input, and coordinates the selection or generation of responses. It is the primary interface for interacting with the chatbot. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.chatterbot` (1:1) + + + + + +### StorageAdapter + +Defines the interface for persisting and retrieving conversational data, primarily `Statement` objects. It abstracts the underlying database technology, enabling the bot to store its learned knowledge and conversational history, which is crucial for maintaining context and improving over time. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.storage.storage_adapter` (1:1) + + + + + +### LogicAdapter + +Implements specific strategies or algorithms for processing input statements and generating a suitable response. This component represents the "brain" of the chatbot, where the core conversational logic resides. Multiple logic adapters can be configured, allowing the `ChatBot` to select the best response based on confidence scores. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.logic.logic_adapter` (1:1) + + + + + +### Trainer + +Provides methods to train the `ChatBot` instance by ingesting different types of conversational data. It populates the `StorageAdapter` with input-response pairs, enabling the bot to learn new conversational patterns and improve its responses over time. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.trainers.trainer` (1:1) + + + + + +### Statement + +Represents a single unit of conversation, whether it's an input from the user or a response from the bot. It encapsulates the text, associated tags, confidence scores, and references to previous statements. `Statement` is the fundamental data structure exchanged and processed by all core components. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.conversation.statement` (1:1) + + + + + +### LLM + +Provides an interface for integrating and interacting with Large Language Models (LLMs) like OpenAI or Ollama. This component allows the chatbot to leverage advanced generative AI capabilities for producing dynamic and contextually rich responses, acting as an alternative or supplement to traditional `LogicAdapter`s. + + + + + +**Related Classes/Methods**: + + + +- `chatterbot.llm.llm` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file From 85242a8b49fa0e0d4f6323d0acff362728bb0f0b Mon Sep 17 00:00:00 2001 From: ivanmilevtues Date: Fri, 17 Oct 2025 18:58:00 +0300 Subject: [PATCH 02/18] Added sphinx config --- .github/workflows/codeboarding-docs.yml | 146 ++++++++++++++++++++++++ docs/architecture/index.rst | 14 +++ docs/conf.py | 1 + docs/index.rst | 1 + pyproject.toml | 1 + 5 files changed, 163 insertions(+) create mode 100644 .github/workflows/codeboarding-docs.yml create mode 100644 docs/architecture/index.rst diff --git a/.github/workflows/codeboarding-docs.yml b/.github/workflows/codeboarding-docs.yml new file mode 100644 index 000000000..5dfbae025 --- /dev/null +++ b/.github/workflows/codeboarding-docs.yml @@ -0,0 +1,146 @@ +name: CodeBoarding Documentation Update + +on: + schedule: + - cron: '0 20 * * 6' # Every Saturday at 8:00 PM UTC + workflow_dispatch: + inputs: + repository_url: + description: 'Repository URL to test with' + required: false + default: 'https://github.com/CodeBoarding/ChatterBot' + type: string + source_branch: + description: 'Source branch for generation' + required: false + default: 'master' + type: string + target_branch: + description: 'Target branch for pull request' + required: false + default: 'master' + type: string + output_format: + description: 'Output format for documentation' + required: false + default: '.rst' + type: choice + options: + - '.mdx' + - '.md' + - '.rst' + output_directory: + description: 'Output directory for documentation files' + required: false + default: '.codeboarding' + type: string + +jobs: + update-docs: + runs-on: ubuntu-latest + timeout-minutes: 45 + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Set branch variables + id: set-branches + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "source_branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT + echo "target_branch=${{ github.base_ref }}" >> $GITHUB_OUTPUT + elif [ "${{ github.event.inputs.source_branch }}" != "" ] && [ "${{ github.event.inputs.target_branch }}" != "" ]; then + echo "source_branch=${{ github.event.inputs.source_branch }}" >> $GITHUB_OUTPUT + echo "target_branch=${{ github.event.inputs.target_branch }}" >> $GITHUB_OUTPUT + else + echo "source_branch=master" >> $GITHUB_OUTPUT + echo "target_branch=master" >> $GITHUB_OUTPUT + fi + + - name: Fetch CodeBoarding Documentation + timeout-minutes: 30 + id: codeboarding + uses: CodeBoarding/CodeBoarding-GHAction@0.1.2 + with: + repository_url: ${{ github.event.inputs.repository_url || 'https://github.com/CodeBoarding/ChatterBot' }} + source_branch: ${{ steps.set-branches.outputs.source_branch }} + target_branch: ${{ steps.set-branches.outputs.target_branch }} + output_directory: ${{ github.event.inputs.output_directory || '.codeboarding' }} + output_format: ${{ github.event.inputs.output_format || '.rst' }} + + - name: Display Action Results + run: | + echo "Documentation files created: ${{ steps.codeboarding.outputs.markdown_files_created }}" + echo "JSON files created: ${{ steps.codeboarding.outputs.json_files_created }}" + echo "Documentation directory: ${{ steps.codeboarding.outputs.output_directory }}" + echo "JSON directory: ${{ steps.codeboarding.outputs.json_directory }}" + echo "Has changes: ${{ steps.codeboarding.outputs.has_changes }}" + + - name: Check for changes + id: git-changes + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "has_git_changes=true" >> $GITHUB_OUTPUT + else + echo "has_git_changes=false" >> $GITHUB_OUTPUT + fi + + - name: Copy CodeBoarding documentation to architecture + if: steps.git-changes.outputs.has_git_changes == 'true' && steps.codeboarding.outputs.has_changes == 'true' + run: | + mkdir -p docs/architecture + + echo "📁 Scanning CodeBoarding directory for .rst files..." + ls -la .codeboarding/ || echo "⚠️ CodeBoarding directory not found" + + copied_files_count=0 + + for file in .codeboarding/*.rst; do + if [ -f "$file" ]; then + filename=$(basename "$file") + echo "✅ Copying: $filename to docs/architecture/" + cp "$file" "docs/architecture/$filename" + copied_files_count=$((copied_files_count + 1)) + fi + done + + echo "" + echo "📊 File copy summary:" + echo " - Total .rst files copied: $copied_files_count" + echo " - Destination: docs/architecture/" + + if [ $copied_files_count -gt 0 ]; then + echo " - Files in destination:" + ls -la docs/architecture/*.rst 2>/dev/null || echo " No .rst files found in destination" + fi + + echo "CodeBoarding documentation copied to docs/architecture/" + + - name: Commit and push changes + if: steps.git-changes.outputs.has_git_changes == 'true' && steps.codeboarding.outputs.has_changes == 'true' + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "docs: update codeboarding architecture documentation + + ## 📚 Documentation Update + This commit contains updated documentation files fetched from the CodeBoarding service. + + ### 📊 Summary + - Documentation files created/updated: ${{ steps.codeboarding.outputs.markdown_files_created }} + - JSON files created/updated: ${{ steps.codeboarding.outputs.json_files_created }} + - Documentation directory: ${{ steps.codeboarding.outputs.output_directory }}/ + - JSON directory: ${{ steps.codeboarding.outputs.json_directory }}/ + - Output format: ${{ github.event.inputs.output_format || '.rst' }} + - Repository analyzed: ${{ steps.codeboarding.outputs.repo_url }} + - Destination: docs/architecture/ + + 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow." + git push diff --git a/docs/architecture/index.rst b/docs/architecture/index.rst new file mode 100644 index 000000000..5054781a9 --- /dev/null +++ b/docs/architecture/index.rst @@ -0,0 +1,14 @@ +Architecture +============ + +This section contains automatically generated architecture documentation powered by CodeBoarding. +The documentation is automatically updated weekly via GitHub Actions. + +.. note:: + These documents are auto-generated from the master branch and reflect the current state of the codebase. + +.. toctree:: + :maxdepth: 2 + :glob: + + * diff --git a/docs/conf.py b/docs/conf.py index 34003cd74..30f6e0aa0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ 'github', 'canonical', 'sphinx_sitemap', + 'sphinxcontrib.mermaid', ] # Sphinx Sitemap Plugin Configuration diff --git a/docs/index.rst b/docs/index.rst index d15a37279..d0a42c466 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -84,6 +84,7 @@ Contents: preprocessors logic/index storage/index + architecture/index large-language-models filters chatterbot diff --git a/pyproject.toml b/pyproject.toml index d348dde90..0e3d9a2c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,7 @@ test = [ "coverage", "sphinx>=5.3,<8.2", "sphinx-sitemap>=2.6.0", + "sphinxcontrib-mermaid", "huggingface_hub", ] dev = [ From 1a69a48cd8505d4948ce7c7f51c34963878b4dae Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 17 Oct 2025 16:54:16 +0000 Subject: [PATCH 03/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 2 - JSON files created/updated: 3 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/ChatBot.md | 267 ----------------- .codeboarding/Input_Output_Processors.json | 132 +++++++++ .codeboarding/Input_Output_Processors.rst | 86 ++++++ .codeboarding/LogicAdapter.md | 179 ------------ .codeboarding/Statement.md | 199 ------------- .codeboarding/StorageAdapter.md | 269 ------------------ .codeboarding/Trainer.md | 149 ---------- .codeboarding/analysis.json | 256 +++++++++++++++++ .codeboarding/codeboarding_version.json | 4 + .codeboarding/on_boarding.md | 183 ------------ .codeboarding/overview.rst | 94 ++++++ docs/architecture/Input_Output_Processors.rst | 86 ++++++ docs/architecture/overview.rst | 94 ++++++ 13 files changed, 752 insertions(+), 1246 deletions(-) delete mode 100644 .codeboarding/ChatBot.md create mode 100644 .codeboarding/Input_Output_Processors.json create mode 100644 .codeboarding/Input_Output_Processors.rst delete mode 100644 .codeboarding/LogicAdapter.md delete mode 100644 .codeboarding/Statement.md delete mode 100644 .codeboarding/StorageAdapter.md delete mode 100644 .codeboarding/Trainer.md create mode 100644 .codeboarding/analysis.json create mode 100644 .codeboarding/codeboarding_version.json delete mode 100644 .codeboarding/on_boarding.md create mode 100644 .codeboarding/overview.rst create mode 100644 docs/architecture/Input_Output_Processors.rst create mode 100644 docs/architecture/overview.rst diff --git a/.codeboarding/ChatBot.md b/.codeboarding/ChatBot.md deleted file mode 100644 index 2db4b8ebb..000000000 --- a/.codeboarding/ChatBot.md +++ /dev/null @@ -1,267 +0,0 @@ -```mermaid - -graph LR - - ChatterBot["ChatterBot"] - - StorageAdapter["StorageAdapter"] - - LogicAdapter["LogicAdapter"] - - Statement["Statement"] - - Preprocessors["Preprocessors"] - - Search["Search"] - - Tagger["Tagger"] - - Trainer["Trainer"] - - ResponseSelection["ResponseSelection"] - - Corpus["Corpus"] - - ChatterBot -- "initializes" --> StorageAdapter - - ChatterBot -- "initializes" --> LogicAdapter - - ChatterBot -- "processes" --> Statement - - ChatterBot -- "applies" --> Preprocessors - - ChatterBot -- "uses" --> Search - - ChatterBot -- "uses" --> Tagger - - StorageAdapter -- "manages" --> Statement - - LogicAdapter -- "generates" --> Statement - - LogicAdapter -- "uses" --> StorageAdapter - - LogicAdapter -- "uses" --> Search - - LogicAdapter -- "uses" --> ResponseSelection - - Trainer -- "trains" --> ChatterBot - - Trainer -- "populates" --> StorageAdapter - - Trainer -- "uses" --> Corpus - - Search -- "queries" --> StorageAdapter - - Search -- "uses" --> Tagger - - Preprocessors -- "transforms" --> Statement - - ResponseSelection -- "selects" --> Statement - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - - click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - - click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -ChatterBot Subsystem: A detailed overview of its internal structure, operational flow, and pivotal role within the conversational AI system, including its relationships with other fundamental components. - - - -### ChatterBot - -The central orchestrator of the conversational AI. It initializes and integrates all other core components, manages the flow of interaction, processes user input, and coordinates the selection or generation of responses. It is the primary interface for interacting with the chatbot. - - - - - -**Related Classes/Methods**: - - - -- `ChatterBot` (0:0) - - - - - -### StorageAdapter - -This abstract base class serves as the blueprint for all data storage and retrieval operations within ChatterBot. It provides a standardized interface for managing conversational data (statements, responses, etc.), allowing different storage backends (e.g., SQL, NoSQL) to be plugged in seamlessly. Its methods are primarily designed to be overridden by concrete implementations. - - - - - -**Related Classes/Methods**: - - - -- `StorageAdapter` (3:178) - - - - - -### LogicAdapter - -An abstract base class that defines the interface for all logic adapters. Logic adapters are responsible for processing input statements and generating appropriate responses based on various algorithms and rules. Concrete implementations provide specific conversational behaviors. - - - - - -**Related Classes/Methods**: - - - -- `LogicAdapter` (9:135) - - - - - -### Statement - -A model class representing a conversational statement, fundamental for storing and retrieving conversational data within ChatterBot. Each `Statement` object encapsulates the text of a statement, its associated responses, and other metadata. - - - - - -**Related Classes/Methods**: - - - -- `Statement` (0:0) - - - - - -### Preprocessors - -A collection of functions that modify or clean input statements before they are processed by the chatbot's logic adapters. This can include tasks like converting text to lowercase, removing punctuation, or stemming words. - - - - - -**Related Classes/Methods**: - - - -- `Preprocessors` (0:0) - - - - - -### Search - -Provides mechanisms for searching and retrieving statements from the chatbot's knowledge base, often used by logic adapters to find matching input statements or potential responses. - - - - - -**Related Classes/Methods**: - - - -- `Search` (0:0) - - - - - -### Tagger - -Responsible for linguistic processing, such as part-of-speech tagging and lemmatization, to create indexed representations of text for efficient searching and comparison. - - - - - -**Related Classes/Methods**: - - - -- `Tagger` (0:0) - - - - - -### Trainer - -Manages the training process of the chatbot, enabling it to learn from various data sources like conversational corpora or lists of statements. It populates the chatbot's knowledge base, typically by interacting with the `StorageAdapter`. - - - - - -**Related Classes/Methods**: - - - -- `Trainer` (0:0) - - - - - -### ResponseSelection - -A component responsible for selecting the most appropriate response from a list of candidate responses generated by logic adapters. It often employs various algorithms to score and rank responses. - - - - - -**Related Classes/Methods**: - - - -- `ResponseSelection` (0:0) - - - - - -### Corpus - -Manages the loading and processing of conversational corpora, which are structured datasets used to train the chatbot. It provides methods to access and iterate over training data. - - - - - -**Related Classes/Methods**: - - - -- `Corpus` (0:0) - - - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Input_Output_Processors.json b/.codeboarding/Input_Output_Processors.json new file mode 100644 index 000000000..56e1909ab --- /dev/null +++ b/.codeboarding/Input_Output_Processors.json @@ -0,0 +1,132 @@ +{ + "description": "The ChatterBot core subsystem is designed around a central `ChatterBot` orchestrator that manages the conversational flow. User input is encapsulated within a `Statement` object, which then undergoes a series of transformations by `Preprocessors` to clean and normalize the text. The `ChatterBot` then leverages various `Logic Adapters` to determine the most appropriate response, often utilizing `Parsing Utilities` for advanced text interpretation. The final response is also represented as a `Statement` object, completing the conversational turn. This modular design allows for flexible extension and customization of input processing, response generation, and data handling.", + "components": [ + { + "name": "ChatterBot", + "description": "The core orchestrator of the conversational system. It manages the lifecycle of a conversation, from receiving input to generating a response. It composes and utilizes preprocessors and logic adapters to achieve its functionality.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.ChatterBot", + "reference_file": "chatterbot/chatterbot.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Statement", + "description": "The fundamental data model representing a single utterance or piece of text within the conversational system. It acts as the primary data carrier, flowing through various components and being modified or consumed by them.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.conversation.Statement", + "reference_file": "chatterbot/conversation.py", + "reference_start_line": 62, + "reference_end_line": 118 + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Preprocessors", + "description": "A collection of functions responsible for applying initial transformations to an input `Statement` object. These transformations, such as cleaning whitespace, unescaping HTML, or converting to ASCII, prepare the text data for subsequent natural language processing tasks.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.preprocessors.clean_whitespace", + "reference_file": "chatterbot/preprocessors.py", + "reference_start_line": 10, + "reference_end_line": 25 + }, + { + "qualified_name": "chatterbot.preprocessors.unescape_html", + "reference_file": "chatterbot/preprocessors.py", + "reference_start_line": 28, + "reference_end_line": 35 + }, + { + "qualified_name": "chatterbot.preprocessors.convert_to_ascii", + "reference_file": "chatterbot/preprocessors.py", + "reference_start_line": 38, + "reference_end_line": 47 + } + ], + "assigned_files": [ + "chatterbot/preprocessors.py" + ], + "can_expand": false + }, + { + "name": "LogicAdapter", + "description": "An abstract base class for components that define the chatbot's response generation strategy. `ChatterBot` can utilize multiple concrete implementations of `LogicAdapter` to process an input statement and select or generate a suitable response.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.logic.logic_adapter.LogicAdapter", + "reference_file": "chatterbot/logic/logic_adapter.py", + "reference_start_line": 10, + "reference_end_line": 136 + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Parsing Utilities", + "description": "This module contains various utilities and functions for advanced interpretation and structuring of text within statements. This includes functionalities like parsing dates, times, and numerical expressions, which are crucial for understanding user intent in complex queries.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.parsing", + "reference_file": "chatterbot/parsing.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "chatterbot/parsing.py" + ], + "can_expand": true + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [ + "chatterbot/languages.py" + ], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "orchestrates", + "src_name": "ChatterBot", + "dst_name": "Preprocessors" + }, + { + "relation": "utilizes", + "src_name": "ChatterBot", + "dst_name": "LogicAdapter" + }, + { + "relation": "creates/processes", + "src_name": "ChatterBot", + "dst_name": "Statement" + }, + { + "relation": "modify", + "src_name": "Preprocessors", + "dst_name": "Statement" + }, + { + "relation": "consumes/produces", + "src_name": "LogicAdapter", + "dst_name": "Statement" + }, + { + "relation": "assists", + "src_name": "Parsing Utilities", + "dst_name": "LogicAdapter" + } + ] +} diff --git a/.codeboarding/Input_Output_Processors.rst b/.codeboarding/Input_Output_Processors.rst new file mode 100644 index 000000000..52b5406f5 --- /dev/null +++ b/.codeboarding/Input_Output_Processors.rst @@ -0,0 +1,86 @@ +Input Output Processors +======================= + +.. mermaid:: + + graph LR + ChatterBot["ChatterBot"] + Statement["Statement"] + Preprocessors["Preprocessors"] + LogicAdapter["LogicAdapter"] + Parsing_Utilities["Parsing Utilities"] + Unclassified["Unclassified"] + ChatterBot -- "orchestrates" --> Preprocessors + ChatterBot -- "utilizes" --> LogicAdapter + ChatterBot -- "creates/processes" --> Statement + Preprocessors -- "modify" --> Statement + LogicAdapter -- "consumes/produces" --> Statement + Parsing_Utilities -- "assists" --> LogicAdapter + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot core subsystem is designed around a central `ChatterBot` orchestrator that manages the conversational flow. User input is encapsulated within a `Statement` object, which then undergoes a series of transformations by `Preprocessors` to clean and normalize the text. The `ChatterBot` then leverages various `Logic Adapters` to determine the most appropriate response, often utilizing `Parsing Utilities` for advanced text interpretation. The final response is also represented as a `Statement` object, completing the conversational turn. This modular design allows for flexible extension and customization of input processing, response generation, and data handling. + +ChatterBot +^^^^^^^^^^ + +The core orchestrator of the conversational system. It manages the lifecycle of a conversation, from receiving input to generating a response. It composes and utilizes preprocessors and logic adapters to achieve its functionality. + +**Related Classes/Methods**: + +* chatterbot.ChatterBot + +Statement +^^^^^^^^^ + +The fundamental data model representing a single utterance or piece of text within the conversational system. It acts as the primary data carrier, flowing through various components and being modified or consumed by them. + +**Related Classes/Methods**: + +* chatterbot.conversation.Statement:62-118 + +Preprocessors +^^^^^^^^^^^^^ + +A collection of functions responsible for applying initial transformations to an input `Statement` object. These transformations, such as cleaning whitespace, unescaping HTML, or converting to ASCII, prepare the text data for subsequent natural language processing tasks. + +**Related Classes/Methods**: + +* chatterbot.preprocessors.clean_whitespace:10-25 +* chatterbot.preprocessors.unescape_html:28-35 +* chatterbot.preprocessors.convert_to_ascii:38-47 + +LogicAdapter +^^^^^^^^^^^^ + +An abstract base class for components that define the chatbot's response generation strategy. `ChatterBot` can utilize multiple concrete implementations of `LogicAdapter` to process an input statement and select or generate a suitable response. + +**Related Classes/Methods**: + +* chatterbot.logic.logic_adapter.LogicAdapter:10-136 + +Parsing Utilities +^^^^^^^^^^^^^^^^^ + +This module contains various utilities and functions for advanced interpretation and structuring of text within statements. This includes functionalities like parsing dates, times, and numerical expressions, which are crucial for understanding user intent in complex queries. + +**Related Classes/Methods**: + +* chatterbot.parsing + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/.codeboarding/LogicAdapter.md b/.codeboarding/LogicAdapter.md deleted file mode 100644 index 6055804b1..000000000 --- a/.codeboarding/LogicAdapter.md +++ /dev/null @@ -1,179 +0,0 @@ -```mermaid - -graph LR - - LogicAdapter["LogicAdapter"] - - ChatterBot["ChatterBot"] - - Statement["Statement"] - - StorageAdapter["StorageAdapter"] - - BestMatch["BestMatch"] - - IndexedTextSearch["IndexedTextSearch"] - - get_first_response["get_first_response"] - - Adapter["Adapter"] - - LogicAdapter -- "inherits from" --> Adapter - - LogicAdapter -- "processes" --> Statement - - ChatterBot -- "uses" --> LogicAdapter - - ChatterBot -- "provides" --> StorageAdapter - - Statement -- "is stored by" --> StorageAdapter - - StorageAdapter -- "provides data to" --> LogicAdapter - - StorageAdapter -- "manages" --> Statement - - BestMatch -- "inherits from" --> LogicAdapter - - BestMatch -- "utilizes" --> IndexedTextSearch - - IndexedTextSearch -- "is used by" --> LogicAdapter - - IndexedTextSearch -- "queries" --> StorageAdapter - - get_first_response -- "is employed by" --> LogicAdapter - - get_first_response -- "receives" --> Statement - - click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - - click Adapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Adapter.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -The LogicAdapter subsystem forms the "brain" of the ChatterBot, encapsulating the core conversational logic. It defines how the chatbot processes input statements, determines a suitable response, and assigns a confidence score to that response. This modular design allows for various conversational strategies to be implemented and selected based on the context. - - - -### LogicAdapter - -This is an abstract base class that defines the interface and core functionality for all logic adapters. It provides methods like `can_process` (to determine if an adapter can handle a given statement) and `process` (to generate a response). It also manages the selection of search algorithms and response selection methods. - - - - - -**Related Classes/Methods**: - - - -- `LogicAdapter:can_process` (79:86) - -- `LogicAdapter:process` (88:105) - -- `Adapter:__init__` (0:0) - - - - - -### ChatterBot - -The main chatbot instance that orchestrates the entire conversational flow. It initializes and utilizes various `LogicAdapter` instances to process user input, select the best response based on confidence scores, and interact with the storage layer. - - - - - -**Related Classes/Methods**: _None_ - - - -### Statement - -Represents a single conversational unit, such as a sentence or phrase. `Statement` objects are the primary data structure passed between the `ChatterBot`, `LogicAdapter` instances, and `StorageAdapter` for processing, searching, and storing conversational data. - - - - - -**Related Classes/Methods**: _None_ - - - -### StorageAdapter - -An abstract class defining the interface for interacting with the chatbot's underlying data store. Logic adapters rely on the `StorageAdapter` to retrieve past conversations, find matching statements, and store new ones. It provides methods for filtering, creating, updating, and retrieving statements. - - - - - -**Related Classes/Methods**: _None_ - - - -### BestMatch - -A concrete implementation of `LogicAdapter` that specializes in finding the best possible response by comparing the input statement to known statements in the database. It leverages a search algorithm to identify the closest match and then selects an appropriate response from associated statements. - - - - - -**Related Classes/Methods**: _None_ - - - -### IndexedTextSearch - -A search algorithm used by logic adapters (like `BestMatch`) to efficiently find statements in the database that are similar to a given input. It interacts with the `StorageAdapter` to retrieve potential matches and then uses a comparison function to determine confidence scores. - - - - - -**Related Classes/Methods**: _None_ - - - -### get_first_response - -A utility function that serves as a default response selection method. When a logic adapter has identified multiple potential responses, this method simply selects the first one from the list. It's a basic strategy that can be overridden by more sophisticated selection methods. - - - - - -**Related Classes/Methods**: _None_ - - - -### Adapter - -A base class from which other components, such as LogicAdapter, inherit, providing common initialization and utility. - - - - - -**Related Classes/Methods**: _None_ - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Statement.md b/.codeboarding/Statement.md deleted file mode 100644 index 85365b709..000000000 --- a/.codeboarding/Statement.md +++ /dev/null @@ -1,199 +0,0 @@ -```mermaid - -graph LR - - Statement["Statement"] - - ChatterBot["ChatterBot"] - - StorageAdapter["StorageAdapter"] - - LogicAdapter["LogicAdapter"] - - Trainer["Trainer"] - - PreProcessor["PreProcessor"] - - StatementComparator["StatementComparator"] - - Statement -- "is processed by" --> ChatterBot - - Statement -- "is stored by" --> StorageAdapter - - ChatterBot -- "processes" --> Statement - - ChatterBot -- "uses" --> LogicAdapter - - StorageAdapter -- "stores/retrieves" --> Statement - - StorageAdapter -- "is used by" --> ChatterBot - - LogicAdapter -- "processes" --> Statement - - LogicAdapter -- "uses" --> StatementComparator - - Trainer -- "trains with" --> Statement - - Trainer -- "uses" --> StorageAdapter - - PreProcessor -- "modifies" --> Statement - - PreProcessor -- "is applied by" --> ChatterBot - - StatementComparator -- "compares" --> Statement - - StatementComparator -- "is used by" --> LogicAdapter - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - - click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" - - click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -An overview of the `Statement` component within the `chatterbot` project, detailing its structure, purpose, and interactions with other core components. - - - -### Statement - -The Statement class serves as the fundamental data structure for representing a single unit of conversation within ChatterBot. It encapsulates the text of an utterance, along with crucial metadata such as its unique identifier (`id`), the conversation it belongs to (`conversation`), the persona who uttered it (`persona`), associated tags (`tags`), and a reference to the statement it is in response to (`in_response_to`). It also includes a `confidence` score (set when the statement is a bot's response) and a `created_at` timestamp. `Statement` objects are the primary means of data exchange and processing across all core components of ChatterBot, enabling the system to store, retrieve, process, respond to, and learn from conversational data. - - - - - -**Related Classes/Methods**: - - - -- `Statement` (1:1) - - - - - -### ChatterBot - -The main orchestrator of the chatbot. It manages the entire conversational flow, from receiving user input to selecting and generating responses. It utilizes various adapters and processors, all of which operate on `Statement` objects. - - - - - -**Related Classes/Methods**: - - - -- `ChatterBot` (1:1) - - - - - -### StorageAdapter - -An abstract base class defining the interface for storing and retrieving `Statement` objects. Concrete implementations (e.g., `SQLStorageAdapter`, `MongoDatabaseAdapter`) handle the actual database interactions. The `Statement.save()` method directly interacts with an instance of this adapter. - - - - - -**Related Classes/Methods**: - - - -- `StorageAdapter` (3:178) - - - - - -### LogicAdapter - -An abstract base class for components that define the chatbot's response logic. Each `LogicAdapter` takes an input `Statement` and returns a response `Statement` (or a confidence score for a potential response). - - - - - -**Related Classes/Methods**: - - - -- `LogicAdapter` (9:135) - - - - - -### Trainer - -An abstract base class for components responsible for training the chatbot. Trainers typically take lists of `Statement` objects (conversational data) and use them to populate the chatbot's knowledge base via the `StorageAdapter`. - - - - - -**Related Classes/Methods**: - - - -- `Trainer` (1:1) - - - - - -### PreProcessor - -An abstract base class for functions that modify an input `Statement` before it is processed by `LogicAdapter`s. Examples include converting text to lowercase or removing punctuation. - - - - - -**Related Classes/Methods**: - - - -- `PreProcessor` (1:1) - - - - - -### StatementComparator - -An abstract base class for functions that compare two `Statement` objects and return a numerical value indicating their similarity or confidence. These are crucial for `LogicAdapter`s to find the best match for an input. - - - - - -**Related Classes/Methods**: - - - -- `StatementComparator` (1:1) - - - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/StorageAdapter.md b/.codeboarding/StorageAdapter.md deleted file mode 100644 index 11718308b..000000000 --- a/.codeboarding/StorageAdapter.md +++ /dev/null @@ -1,269 +0,0 @@ -```mermaid - -graph LR - - StorageAdapter["StorageAdapter"] - - Statement["Statement"] - - MongoDatabaseAdapter["MongoDatabaseAdapter"] - - SQLStorageAdapter["SQLStorageAdapter"] - - DjangoStorageAdapter["DjangoStorageAdapter"] - - RedisStorageAdapter["RedisStorageAdapter"] - - ChatterBot["ChatterBot"] - - LogicAdapter["LogicAdapter"] - - SQLAlchemyAppModels["SQLAlchemyAppModels"] - - VectorStores["VectorStores"] - - StorageAdapter -- "defines interface for" --> Statement - - MongoDatabaseAdapter -- "implements" --> StorageAdapter - - SQLStorageAdapter -- "implements" --> StorageAdapter - - DjangoStorageAdapter -- "implements" --> StorageAdapter - - RedisStorageAdapter -- "implements" --> StorageAdapter - - MongoDatabaseAdapter -- "manages" --> Statement - - SQLStorageAdapter -- "manages" --> Statement - - DjangoStorageAdapter -- "manages" --> Statement - - RedisStorageAdapter -- "manages" --> Statement - - ChatterBot -- "uses" --> StorageAdapter - - LogicAdapter -- "queries" --> StorageAdapter - - SQLStorageAdapter -- "uses" --> SQLAlchemyAppModels - - RedisStorageAdapter -- "uses" --> VectorStores - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - - click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -The `StorageAdapter` subsystem is fundamental to ChatterBot's ability to learn and maintain context by abstracting how conversational data is stored and retrieved. This design allows ChatterBot to be flexible with its backend database, supporting various storage solutions without altering the core logic. - - - -### StorageAdapter - -This is the abstract base class that defines the contract for all storage mechanisms within ChatterBot. It specifies the essential methods (e.g., `count`, `remove`, `filter`, `create`, `update`, `get_random`, `drop`) that any concrete storage adapter must implement to persist and retrieve `Statement` objects. Its purpose is to decouple the core chatbot logic from the underlying database technology. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) - -- `chatterbot.storage.storage_adapter.StorageAdapter:count` (56:62) - -- `chatterbot.storage.storage_adapter.StorageAdapter:remove` (64:72) - -- `chatterbot.storage.storage_adapter.StorageAdapter:filter` (74:123) - -- `chatterbot.storage.storage_adapter.StorageAdapter:create` (125:132) - -- `chatterbot.storage.storage_adapter.StorageAdapter:update` (142:149) - -- `chatterbot.storage.storage_adapter.StorageAdapter:get_random` (151:157) - -- `chatterbot.storage.storage_adapter.StorageAdapter:drop` (159:165) - - - - - -### Statement - -The core data model representing a single conversational utterance. A `Statement` object encapsulates the text of a user's input or the bot's response, along with metadata such as `in_response_to` (linking it to previous statements) and `tags`. It is the primary entity that `StorageAdapter` implementations are designed to store and retrieve. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.conversation.statement.Statement` (61:117) - - - - - -### MongoDatabaseAdapter - -These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.mongodb.MongoDatabaseAdapter` (5:249) - - - - - -### SQLStorageAdapter - -These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.sql_storage.SQLStorageAdapter` (4:408) - - - - - -### DjangoStorageAdapter - -These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.django_storage.DjangoStorageAdapter` (4:218) - - - - - -### RedisStorageAdapter - -These are the specific implementations of the `StorageAdapter` interface, each tailored to interact with a particular database technology (MongoDB, SQL databases via SQLAlchemy, Django's ORM, and Redis, respectively). They translate the abstract storage operations into concrete database queries and commands. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.redis.RedisStorageAdapter` (1:1) - - - - - -### ChatterBot - -The main application class that orchestrates the entire chatbot's functionality. It initializes and utilizes a specific `StorageAdapter` instance to manage the bot's conversational data. It relies on the storage adapter to load existing knowledge, save new interactions, and retrieve statements for processing. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.chatterbot.ChatterBot` (1:1) - - - - - -### LogicAdapter - -Components responsible for processing user input and generating appropriate responses. `LogicAdapter`s frequently query the `StorageAdapter` to retrieve relevant `Statement` objects from the bot's knowledge base, which are then used to determine the best possible response. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.logic.logic_adapter.LogicAdapter` (9:135) - - - - - -### SQLAlchemyAppModels - -This module contains the SQLAlchemy ORM models (e.g., `Statement`, `Response`) that define the database schema for relational databases. These models are specifically used by the `SQLStorageAdapter` to map Python objects to database tables and facilitate data persistence. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.ext.sqlalchemy_app.models` (1:1) - - - - - -### VectorStores - -This module likely provides functionalities for storing and querying vector embeddings of text, which can be used for semantic search or similarity matching. The `RedisStorageAdapter` leverages this for advanced data retrieval, especially when dealing with large datasets or requiring efficient similarity-based lookups. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.vectorstores` (1:1) - - - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Trainer.md b/.codeboarding/Trainer.md deleted file mode 100644 index 1744cfdc4..000000000 --- a/.codeboarding/Trainer.md +++ /dev/null @@ -1,149 +0,0 @@ -```mermaid - -graph LR - - Trainer["Trainer"] - - ChatBot["ChatBot"] - - Statement["Statement"] - - PreProcessor["PreProcessor"] - - StorageAdapter["StorageAdapter"] - - Trainer -- "uses" --> ChatBot - - Trainer -- "processes" --> Statement - - Trainer -- "applies" --> PreProcessor - - Trainer -- "interacts with" --> StorageAdapter - - click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" - - click ChatBot href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//ChatBot.md" "Details" - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -The `Trainer` subsystem in ChatterBot is responsible for managing the process of teaching the chatbot new conversational patterns. It provides a foundational structure for various training methods, allowing the chatbot to learn from diverse data sources. - - - -### Trainer - -This is the abstract base class for all training methods. It provides common functionalities such as initializing with a `ChatBot` instance, preprocessing input statements, and exporting conversational data for training. Its `train` method is abstract and must be implemented by concrete trainer classes. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.trainers.Trainer` (13:76) - -- `chatterbot.trainers.Trainer:train` (42:46) - -- `chatterbot.chatterbot.ChatBot` (12:360) - -- `chatterbot.preprocessors.PreProcessor` (0:0) - -- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) - -- `chatterbot.conversation.statement.Statement` (61:117) - - - - - -### ChatBot - -The central instance of the chatbot. The `Trainer` interacts directly with the `ChatBot` to access its `StorageAdapter` (for data persistence) and `PreProcessor` instances (for input preparation). - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.chatterbot.ChatBot` (12:360) - - - - - -### Statement - -Represents a single unit of conversational data, typically an input or a response. The `Trainer` processes and manipulates `Statement` objects during preprocessing and data export. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.conversation.statement.Statement` (61:117) - - - - - -### PreProcessor - -A callable object (or function) responsible for modifying or cleaning input statements before they are processed or stored. The `Trainer` applies these preprocessors to incoming statements. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.preprocessors.PreProcessor` (0:0) - - - - - -### StorageAdapter - -Manages the persistence and retrieval of conversational data (statements) for the chatbot. The `Trainer` uses the `StorageAdapter` to access existing conversations for export. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.storage_adapter.StorageAdapter` (3:178) - - - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json new file mode 100644 index 000000000..6dedb5746 --- /dev/null +++ b/.codeboarding/analysis.json @@ -0,0 +1,256 @@ +{ + "description": "The ChatterBot architecture is designed around a central `Chatbot Core Engine` that orchestrates the conversational flow. User input is first handled by `Input/Output Processors` for cleaning and parsing. The processed input is then fed to the `Chatbot Core Engine`, which delegates the task of generating a response to `Logic & Response Adapters`. These adapters interact with the `Data Storage & Training` component to retrieve conversational data and knowledge. For advanced generative capabilities, the `Chatbot Core Engine` can also interact with the `LLM Integration` component. The `Data Storage & Training` component is responsible for persisting conversational data and providing training mechanisms. This modular design allows for flexible extension and customization of the chatbot's behavior and knowledge base.", + "components": [ + { + "name": "Chatbot Core Engine", + "description": "The central orchestrator, managing conversation flow, input processing, and response generation. It coordinates all other components.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.ChatBot", + "reference_file": "chatterbot/chatterbot.py", + "reference_start_line": 13, + "reference_end_line": 361 + } + ], + "assigned_files": [ + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/terminal_mongo_example.py", + "examples/tkinter_gui.py", + "examples/django_example/django_example/views.py", + "examples/learning_feedback_example.py", + "chatterbot/__main__.py", + "chatterbot/conversation.py", + "chatterbot/chatterbot.py" + ], + "can_expand": true + }, + { + "name": "Logic & Response Adapters", + "description": "A collection of specialized modules that determine how the chatbot responds to specific types of input, including statement comparison and response selection logic.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.logic.logic_adapter.LogicAdapter", + "reference_file": "chatterbot/logic/logic_adapter.py", + "reference_start_line": 10, + "reference_end_line": 136 + }, + { + "qualified_name": "chatterbot.comparisons", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": null, + "reference_end_line": null + }, + { + "qualified_name": "chatterbot.response_selection", + "reference_file": "chatterbot/response_selection.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "examples/specific_response_example.py", + "examples/math_and_time.py", + "examples/convert_units.py", + "examples/default_response_example.py", + "chatterbot/search.py", + "chatterbot/response_selection.py", + "chatterbot/vectorstores.py", + "chatterbot/filters.py", + "chatterbot/comparisons.py", + "chatterbot/logic/unit_conversion.py", + "chatterbot/logic/mathematical_evaluation.py", + "chatterbot/logic/logic_adapter.py", + "chatterbot/logic/best_match.py", + "chatterbot/logic/specific_response.py", + "chatterbot/logic/time_adapter.py" + ], + "can_expand": true + }, + { + "name": "Data Storage & Training", + "description": "Manages the persistence and retrieval of conversational data (statements, responses), handles the entire training lifecycle, and loads corpus data.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.storage.storage_adapter.StorageAdapter", + "reference_file": "chatterbot/storage/storage_adapter.py", + "reference_start_line": 4, + "reference_end_line": 179 + }, + { + "qualified_name": "chatterbot.trainers", + "reference_file": "chatterbot/trainers.py", + "reference_start_line": null, + "reference_end_line": null + }, + { + "qualified_name": "chatterbot.corpus", + "reference_file": "chatterbot/corpus.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/training_example_ubuntu_corpus.py", + "examples/export_example.py", + "examples/django_example/django_example/management/commands/train.py", + "chatterbot/corpus.py", + "chatterbot/tagging.py", + "chatterbot/trainers.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/sqlalchemy_app/models.py", + "chatterbot/storage/storage_adapter.py", + "chatterbot/storage/mongodb.py", + "chatterbot/storage/redis.py", + "chatterbot/storage/sql_storage.py", + "chatterbot/storage/django_storage.py" + ], + "can_expand": true + }, + { + "name": "Input/Output Processors", + "description": "Responsible for preprocessing raw user input (e.g., cleaning whitespace, parsing dates) before it reaches the core engine, and potentially post-processing responses.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.preprocessors", + "reference_file": "chatterbot/chatterbot.py", + "reference_start_line": 118, + "reference_end_line": 118 + }, + { + "qualified_name": "chatterbot.parsing", + "reference_file": "chatterbot/parsing.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "chatterbot/parsing.py", + "chatterbot/preprocessors.py", + "chatterbot/languages.py" + ], + "can_expand": true + }, + { + "name": "LLM Integration", + "description": "Provides an abstract interface for integrating Large Language Models, allowing ChatterBot to leverage advanced generative capabilities for responses.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.llm", + "reference_file": "chatterbot/llm.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "examples/openai_example.py", + "examples/ollama_example.py", + "chatterbot/llm.py" + ], + "can_expand": true + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [ + "examples/__init__.py", + "examples/django_example/manage.py", + "examples/django_example/django_example/asgi.py", + "examples/django_example/django_example/__init__.py", + "examples/django_example/django_example/settings.py", + "examples/django_example/django_example/wsgi.py", + "examples/django_example/django_example/urls.py", + "examples/django_example/django_example/management/__init__.py", + "examples/django_example/django_example/management/commands/__init__.py", + "docs/conf.py", + "docs/_ext/github.py", + "docs/_ext/canonical.py", + "chatterbot/__init__.py", + "chatterbot/adapters.py", + "chatterbot/constants.py", + "chatterbot/utils.py", + "chatterbot/components.py", + "chatterbot/exceptions.py", + "chatterbot/ext/__init__.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/storage/__init__.py", + "chatterbot/logic/__init__.py" + ], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "Receives Processed Input From", + "src_name": "Chatbot Core Engine", + "dst_name": "Input/Output Processors" + }, + { + "relation": "Delegates Response Generation To", + "src_name": "Chatbot Core Engine", + "dst_name": "Logic & Response Adapters" + }, + { + "relation": "Queries Knowledge Base From", + "src_name": "Logic & Response Adapters", + "dst_name": "Data Storage & Training" + }, + { + "relation": "Persists Conversational Data To", + "src_name": "Chatbot Core Engine", + "dst_name": "Data Storage & Training" + }, + { + "relation": "Sends Prompt For Generative Response To", + "src_name": "Chatbot Core Engine", + "dst_name": "LLM Integration" + }, + { + "relation": "Provides Stored Data To", + "src_name": "Data Storage & Training", + "dst_name": "Chatbot Core Engine" + }, + { + "relation": "Provides Knowledge Base Data To", + "src_name": "Data Storage & Training", + "dst_name": "Logic & Response Adapters" + }, + { + "relation": "Returns Generative Response To", + "src_name": "LLM Integration", + "dst_name": "Chatbot Core Engine" + } + ] +} diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json new file mode 100644 index 000000000..01bfdafbf --- /dev/null +++ b/.codeboarding/codeboarding_version.json @@ -0,0 +1,4 @@ +{ + "commit_hash": "85242a8b49fa0e0d4f6323d0acff362728bb0f0b", + "code_boarding_version": "0.2.0" +} diff --git a/.codeboarding/on_boarding.md b/.codeboarding/on_boarding.md deleted file mode 100644 index f8bfa78dd..000000000 --- a/.codeboarding/on_boarding.md +++ /dev/null @@ -1,183 +0,0 @@ -```mermaid - -graph LR - - ChatBot["ChatBot"] - - StorageAdapter["StorageAdapter"] - - LogicAdapter["LogicAdapter"] - - Trainer["Trainer"] - - Statement["Statement"] - - LLM["LLM"] - - ChatBot -- "Orchestrates" --> LogicAdapter - - ChatBot -- "Manages" --> StorageAdapter - - ChatBot -- "Utilizes" --> Trainer - - ChatBot -- "Interacts with" --> LLM - - ChatBot -- "Processes" --> Statement - - StorageAdapter -- "Stores" --> Statement - - StorageAdapter -- "Provides data to" --> ChatBot - - LogicAdapter -- "Processes" --> Statement - - LogicAdapter -- "Provides responses to" --> ChatBot - - Trainer -- "Trains" --> ChatBot - - Trainer -- "Populates" --> StorageAdapter - - Statement -- "Is processed by" --> LogicAdapter - - Statement -- "Is stored by" --> StorageAdapter - - LLM -- "Generates responses from" --> Statement - - LLM -- "Integrated with" --> ChatBot - - click ChatBot href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//ChatBot.md" "Details" - - click StorageAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//StorageAdapter.md" "Details" - - click LogicAdapter href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//LogicAdapter.md" "Details" - - click Trainer href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Trainer.md" "Details" - - click Statement href "https://github.com/gunthercox/ChatterBot/blob/master/.codeboarding//Statement.md" "Details" - -``` - -[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) - - - -## Component Details - - - -These six components are chosen as fundamental because they represent the essential functional blocks required for any conversational AI system like ChatterBot: ChatBot (entry point and central control unit), StorageAdapter (memory and persistence), LogicAdapter (the "brain" or intelligence), Trainer (learning mechanism), Statement (universal data structure), and LLM (generative capabilities). - - - -### ChatBot - -The central orchestrator of the conversational AI. It initializes and integrates all other core components, manages the flow of interaction, processes user input, and coordinates the selection or generation of responses. It is the primary interface for interacting with the chatbot. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.chatterbot` (1:1) - - - - - -### StorageAdapter - -Defines the interface for persisting and retrieving conversational data, primarily `Statement` objects. It abstracts the underlying database technology, enabling the bot to store its learned knowledge and conversational history, which is crucial for maintaining context and improving over time. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.storage.storage_adapter` (1:1) - - - - - -### LogicAdapter - -Implements specific strategies or algorithms for processing input statements and generating a suitable response. This component represents the "brain" of the chatbot, where the core conversational logic resides. Multiple logic adapters can be configured, allowing the `ChatBot` to select the best response based on confidence scores. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.logic.logic_adapter` (1:1) - - - - - -### Trainer - -Provides methods to train the `ChatBot` instance by ingesting different types of conversational data. It populates the `StorageAdapter` with input-response pairs, enabling the bot to learn new conversational patterns and improve its responses over time. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.trainers.trainer` (1:1) - - - - - -### Statement - -Represents a single unit of conversation, whether it's an input from the user or a response from the bot. It encapsulates the text, associated tags, confidence scores, and references to previous statements. `Statement` is the fundamental data structure exchanged and processed by all core components. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.conversation.statement` (1:1) - - - - - -### LLM - -Provides an interface for integrating and interacting with Large Language Models (LLMs) like OpenAI or Ollama. This component allows the chatbot to leverage advanced generative AI capabilities for producing dynamic and contextually rich responses, acting as an alternative or supplement to traditional `LogicAdapter`s. - - - - - -**Related Classes/Methods**: - - - -- `chatterbot.llm.llm` (1:1) - - - - - - - - - -### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst new file mode 100644 index 000000000..30e33ceb5 --- /dev/null +++ b/.codeboarding/overview.rst @@ -0,0 +1,94 @@ +Overview +======== + +.. mermaid:: + + graph LR + Chatbot_Core_Engine["Chatbot Core Engine"] + Logic_Response_Adapters["Logic & Response Adapters"] + Data_Storage_Training["Data Storage & Training"] + Input_Output_Processors["Input/Output Processors"] + LLM_Integration["LLM Integration"] + Unclassified["Unclassified"] + Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors + Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters + Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training + Chatbot_Core_Engine -- "Persists Conversational Data To" --> Data_Storage_Training + Chatbot_Core_Engine -- "Sends Prompt For Generative Response To" --> LLM_Integration + Data_Storage_Training -- "Provides Stored Data To" --> Chatbot_Core_Engine + Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters + LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine + click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot architecture is designed around a central `Chatbot Core Engine` that orchestrates the conversational flow. User input is first handled by `Input/Output Processors` for cleaning and parsing. The processed input is then fed to the `Chatbot Core Engine`, which delegates the task of generating a response to `Logic & Response Adapters`. These adapters interact with the `Data Storage & Training` component to retrieve conversational data and knowledge. For advanced generative capabilities, the `Chatbot Core Engine` can also interact with the `LLM Integration` component. The `Data Storage & Training` component is responsible for persisting conversational data and providing training mechanisms. This modular design allows for flexible extension and customization of the chatbot's behavior and knowledge base. + +Chatbot Core Engine +^^^^^^^^^^^^^^^^^^^ + +The central orchestrator, managing conversation flow, input processing, and response generation. It coordinates all other components. + +**Related Classes/Methods**: + +* chatterbot.ChatBot:13-361 + +Logic & Response Adapters +^^^^^^^^^^^^^^^^^^^^^^^^^ + +A collection of specialized modules that determine how the chatbot responds to specific types of input, including statement comparison and response selection logic. + +**Related Classes/Methods**: + +* chatterbot.logic.logic_adapter.LogicAdapter:10-136 +* chatterbot.comparisons +* chatterbot.response_selection + +Data Storage & Training +^^^^^^^^^^^^^^^^^^^^^^^ + +Manages the persistence and retrieval of conversational data (statements, responses), handles the entire training lifecycle, and loads corpus data. + +**Related Classes/Methods**: + +* chatterbot.storage.storage_adapter.StorageAdapter:4-179 +* chatterbot.trainers +* chatterbot.corpus + +Input/Output Processors +^^^^^^^^^^^^^^^^^^^^^^^ + +:ref:`Expand ` + +Responsible for preprocessing raw user input (e.g., cleaning whitespace, parsing dates) before it reaches the core engine, and potentially post-processing responses. + +**Related Classes/Methods**: + +* chatterbot.preprocessors +* chatterbot.parsing + +LLM Integration +^^^^^^^^^^^^^^^ + +Provides an abstract interface for integrating Large Language Models, allowing ChatterBot to leverage advanced generative capabilities for responses. + +**Related Classes/Methods**: + +* chatterbot.llm + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/Input_Output_Processors.rst b/docs/architecture/Input_Output_Processors.rst new file mode 100644 index 000000000..52b5406f5 --- /dev/null +++ b/docs/architecture/Input_Output_Processors.rst @@ -0,0 +1,86 @@ +Input Output Processors +======================= + +.. mermaid:: + + graph LR + ChatterBot["ChatterBot"] + Statement["Statement"] + Preprocessors["Preprocessors"] + LogicAdapter["LogicAdapter"] + Parsing_Utilities["Parsing Utilities"] + Unclassified["Unclassified"] + ChatterBot -- "orchestrates" --> Preprocessors + ChatterBot -- "utilizes" --> LogicAdapter + ChatterBot -- "creates/processes" --> Statement + Preprocessors -- "modify" --> Statement + LogicAdapter -- "consumes/produces" --> Statement + Parsing_Utilities -- "assists" --> LogicAdapter + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot core subsystem is designed around a central `ChatterBot` orchestrator that manages the conversational flow. User input is encapsulated within a `Statement` object, which then undergoes a series of transformations by `Preprocessors` to clean and normalize the text. The `ChatterBot` then leverages various `Logic Adapters` to determine the most appropriate response, often utilizing `Parsing Utilities` for advanced text interpretation. The final response is also represented as a `Statement` object, completing the conversational turn. This modular design allows for flexible extension and customization of input processing, response generation, and data handling. + +ChatterBot +^^^^^^^^^^ + +The core orchestrator of the conversational system. It manages the lifecycle of a conversation, from receiving input to generating a response. It composes and utilizes preprocessors and logic adapters to achieve its functionality. + +**Related Classes/Methods**: + +* chatterbot.ChatterBot + +Statement +^^^^^^^^^ + +The fundamental data model representing a single utterance or piece of text within the conversational system. It acts as the primary data carrier, flowing through various components and being modified or consumed by them. + +**Related Classes/Methods**: + +* chatterbot.conversation.Statement:62-118 + +Preprocessors +^^^^^^^^^^^^^ + +A collection of functions responsible for applying initial transformations to an input `Statement` object. These transformations, such as cleaning whitespace, unescaping HTML, or converting to ASCII, prepare the text data for subsequent natural language processing tasks. + +**Related Classes/Methods**: + +* chatterbot.preprocessors.clean_whitespace:10-25 +* chatterbot.preprocessors.unescape_html:28-35 +* chatterbot.preprocessors.convert_to_ascii:38-47 + +LogicAdapter +^^^^^^^^^^^^ + +An abstract base class for components that define the chatbot's response generation strategy. `ChatterBot` can utilize multiple concrete implementations of `LogicAdapter` to process an input statement and select or generate a suitable response. + +**Related Classes/Methods**: + +* chatterbot.logic.logic_adapter.LogicAdapter:10-136 + +Parsing Utilities +^^^^^^^^^^^^^^^^^ + +This module contains various utilities and functions for advanced interpretation and structuring of text within statements. This includes functionalities like parsing dates, times, and numerical expressions, which are crucial for understanding user intent in complex queries. + +**Related Classes/Methods**: + +* chatterbot.parsing + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst new file mode 100644 index 000000000..30e33ceb5 --- /dev/null +++ b/docs/architecture/overview.rst @@ -0,0 +1,94 @@ +Overview +======== + +.. mermaid:: + + graph LR + Chatbot_Core_Engine["Chatbot Core Engine"] + Logic_Response_Adapters["Logic & Response Adapters"] + Data_Storage_Training["Data Storage & Training"] + Input_Output_Processors["Input/Output Processors"] + LLM_Integration["LLM Integration"] + Unclassified["Unclassified"] + Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors + Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters + Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training + Chatbot_Core_Engine -- "Persists Conversational Data To" --> Data_Storage_Training + Chatbot_Core_Engine -- "Sends Prompt For Generative Response To" --> LLM_Integration + Data_Storage_Training -- "Provides Stored Data To" --> Chatbot_Core_Engine + Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters + LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine + click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot architecture is designed around a central `Chatbot Core Engine` that orchestrates the conversational flow. User input is first handled by `Input/Output Processors` for cleaning and parsing. The processed input is then fed to the `Chatbot Core Engine`, which delegates the task of generating a response to `Logic & Response Adapters`. These adapters interact with the `Data Storage & Training` component to retrieve conversational data and knowledge. For advanced generative capabilities, the `Chatbot Core Engine` can also interact with the `LLM Integration` component. The `Data Storage & Training` component is responsible for persisting conversational data and providing training mechanisms. This modular design allows for flexible extension and customization of the chatbot's behavior and knowledge base. + +Chatbot Core Engine +^^^^^^^^^^^^^^^^^^^ + +The central orchestrator, managing conversation flow, input processing, and response generation. It coordinates all other components. + +**Related Classes/Methods**: + +* chatterbot.ChatBot:13-361 + +Logic & Response Adapters +^^^^^^^^^^^^^^^^^^^^^^^^^ + +A collection of specialized modules that determine how the chatbot responds to specific types of input, including statement comparison and response selection logic. + +**Related Classes/Methods**: + +* chatterbot.logic.logic_adapter.LogicAdapter:10-136 +* chatterbot.comparisons +* chatterbot.response_selection + +Data Storage & Training +^^^^^^^^^^^^^^^^^^^^^^^ + +Manages the persistence and retrieval of conversational data (statements, responses), handles the entire training lifecycle, and loads corpus data. + +**Related Classes/Methods**: + +* chatterbot.storage.storage_adapter.StorageAdapter:4-179 +* chatterbot.trainers +* chatterbot.corpus + +Input/Output Processors +^^^^^^^^^^^^^^^^^^^^^^^ + +:ref:`Expand ` + +Responsible for preprocessing raw user input (e.g., cleaning whitespace, parsing dates) before it reaches the core engine, and potentially post-processing responses. + +**Related Classes/Methods**: + +* chatterbot.preprocessors +* chatterbot.parsing + +LLM Integration +^^^^^^^^^^^^^^^ + +Provides an abstract interface for integrating Large Language Models, allowing ChatterBot to leverage advanced generative capabilities for responses. + +**Related Classes/Methods**: + +* chatterbot.llm + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 95fe9eac1cab27669e200424ddf3a063cf91ed3d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 18 Oct 2025 20:27:58 +0000 Subject: [PATCH 04/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 4 - JSON files created/updated: 5 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/Chatbot_Core_Engine.json | 142 ++++++++++++++++++++ .codeboarding/Chatbot_Core_Engine.rst | 96 +++++++++++++ .codeboarding/Data_Storage_Training.json | 113 ++++++++++++++++ .codeboarding/Data_Storage_Training.rst | 61 +++++++++ .codeboarding/Input_Output_Processors.json | 30 +---- .codeboarding/analysis.json | 117 ++++++++-------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 14 ++ docs/architecture/Chatbot_Core_Engine.rst | 96 +++++++++++++ docs/architecture/Data_Storage_Training.rst | 61 +++++++++ docs/architecture/overview.rst | 14 ++ 11 files changed, 666 insertions(+), 80 deletions(-) create mode 100644 .codeboarding/Chatbot_Core_Engine.json create mode 100644 .codeboarding/Chatbot_Core_Engine.rst create mode 100644 .codeboarding/Data_Storage_Training.json create mode 100644 .codeboarding/Data_Storage_Training.rst create mode 100644 docs/architecture/Chatbot_Core_Engine.rst create mode 100644 docs/architecture/Data_Storage_Training.rst diff --git a/.codeboarding/Chatbot_Core_Engine.json b/.codeboarding/Chatbot_Core_Engine.json new file mode 100644 index 000000000..65d923705 --- /dev/null +++ b/.codeboarding/Chatbot_Core_Engine.json @@ -0,0 +1,142 @@ +{ + "description": "This graph represents the core functionality of a document processing and question-answering system. The main flow involves ingesting documents, processing them into a searchable format, and then using a language model to answer user queries based on the ingested content. Its purpose is to provide an intelligent interface for users to retrieve information from a collection of documents.", + "components": [ + { + "name": "Document Ingestion", + "description": "Handles the loading and initial processing of various document types.", + "referenced_source_code": [ + { + "qualified_name": "langchain_community.document_loaders.pdf.PyPDFLoader", + "reference_file": "document_ingestion.py", + "reference_start_line": null, + "reference_end_line": null + }, + { + "qualified_name": "langchain_community.document_loaders.csv_loader.CSVLoader", + "reference_file": "document_ingestion.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": false + }, + { + "name": "Text Splitter", + "description": "Breaks down large documents into smaller, manageable chunks for efficient processing and embedding.", + "referenced_source_code": [ + { + "qualified_name": "langchain.text_splitter.RecursiveCharacterTextSplitter", + "reference_file": "text_processing.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Vector Store", + "description": "Stores and retrieves document embeddings, enabling semantic search.", + "referenced_source_code": [ + { + "qualified_name": "langchain_community.vectorstores.chroma.Chroma", + "reference_file": "vector_db.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Embeddings Model", + "description": "Generates numerical representations (embeddings) of text chunks.", + "referenced_source_code": [ + { + "qualified_name": "langchain_community.embeddings.ollama.OllamaEmbeddings", + "reference_file": "embedding_model.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": false + }, + { + "name": "Language Model (LLM)", + "description": "Processes user queries and generates answers based on retrieved context.", + "referenced_source_code": [ + { + "qualified_name": "langchain_community.llms.ollama.Ollama", + "reference_file": "llm_interface.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Retrieval Chain", + "description": "Orchestrates the retrieval of relevant document chunks and passes them to the LLM for answer generation.", + "referenced_source_code": [ + { + "qualified_name": "langchain.chains.retrieval.create_retrieval_chain", + "reference_file": "retrieval_chain.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": false + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [ + "chatterbot/conversation.py", + "chatterbot/chatterbot.py" + ], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "loads documents into", + "src_name": "Document Ingestion", + "dst_name": "Text Splitter" + }, + { + "relation": "splits text for", + "src_name": "Text Splitter", + "dst_name": "Embeddings Model" + }, + { + "relation": "generates embeddings for", + "src_name": "Embeddings Model", + "dst_name": "Vector Store" + }, + { + "relation": "stores embeddings from", + "src_name": "Vector Store", + "dst_name": "Embeddings Model" + }, + { + "relation": "retrieves context for", + "src_name": "Vector Store", + "dst_name": "Retrieval Chain" + }, + { + "relation": "uses", + "src_name": "Retrieval Chain", + "dst_name": "Language Model (LLM)" + }, + { + "relation": "answers queries using", + "src_name": "Language Model (LLM)", + "dst_name": "Retrieval Chain" + } + ] +} diff --git a/.codeboarding/Chatbot_Core_Engine.rst b/.codeboarding/Chatbot_Core_Engine.rst new file mode 100644 index 000000000..8d8ca5fbf --- /dev/null +++ b/.codeboarding/Chatbot_Core_Engine.rst @@ -0,0 +1,96 @@ +Chatbot Core Engine +=================== + +.. mermaid:: + + graph LR + Document_Ingestion["Document Ingestion"] + Text_Splitter["Text Splitter"] + Vector_Store["Vector Store"] + Embeddings_Model["Embeddings Model"] + Language_Model_LLM_["Language Model (LLM)"] + Retrieval_Chain["Retrieval Chain"] + Unclassified["Unclassified"] + Document_Ingestion -- "loads documents into" --> Text_Splitter + Text_Splitter -- "splits text for" --> Embeddings_Model + Embeddings_Model -- "generates embeddings for" --> Vector_Store + Vector_Store -- "stores embeddings from" --> Embeddings_Model + Vector_Store -- "retrieves context for" --> Retrieval_Chain + Retrieval_Chain -- "uses" --> Language_Model_LLM_ + Language_Model_LLM_ -- "answers queries using" --> Retrieval_Chain + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +This graph represents the core functionality of a document processing and question-answering system. The main flow involves ingesting documents, processing them into a searchable format, and then using a language model to answer user queries based on the ingested content. Its purpose is to provide an intelligent interface for users to retrieve information from a collection of documents. + +Document Ingestion +^^^^^^^^^^^^^^^^^^ + +Handles the loading and initial processing of various document types. + +**Related Classes/Methods**: + +* langchain_community.document_loaders.pdf.PyPDFLoader +* langchain_community.document_loaders.csv_loader.CSVLoader + +Text Splitter +^^^^^^^^^^^^^ + +Breaks down large documents into smaller, manageable chunks for efficient processing and embedding. + +**Related Classes/Methods**: + +* langchain.text_splitter.RecursiveCharacterTextSplitter + +Vector Store +^^^^^^^^^^^^ + +Stores and retrieves document embeddings, enabling semantic search. + +**Related Classes/Methods**: + +* langchain_community.vectorstores.chroma.Chroma + +Embeddings Model +^^^^^^^^^^^^^^^^ + +Generates numerical representations (embeddings) of text chunks. + +**Related Classes/Methods**: + +* langchain_community.embeddings.ollama.OllamaEmbeddings + +Language Model (LLM) +^^^^^^^^^^^^^^^^^^^^ + +Processes user queries and generates answers based on retrieved context. + +**Related Classes/Methods**: + +* langchain_community.llms.ollama.Ollama + +Retrieval Chain +^^^^^^^^^^^^^^^ + +Orchestrates the retrieval of relevant document chunks and passes them to the LLM for answer generation. + +**Related Classes/Methods**: + +* langchain.chains.retrieval.create_retrieval_chain + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/.codeboarding/Data_Storage_Training.json b/.codeboarding/Data_Storage_Training.json new file mode 100644 index 000000000..5780918d2 --- /dev/null +++ b/.codeboarding/Data_Storage_Training.json @@ -0,0 +1,113 @@ +{ + "description": "The ChatterBot system is structured around three core components: the `Storage Adapters`, `Training Module`, and `Corpus Data Loader`. The `Corpus Data Loader` is responsible for providing raw conversational data, which is then consumed by the `Training Module`. The `Training Module` processes this data to learn and update the chatbot's knowledge base, persisting and retrieving conversational statements through the `Storage Adapters`. This design ensures a clear separation of concerns, allowing for flexible data storage and diverse training methodologies.", + "components": [ + { + "name": "Storage Adapters", + "description": "Provides an abstract interface for all data persistence and retrieval operations within ChatterBot. It allows for interchangeable storage backends (e.g., SQL, NoSQL, in-memory) without affecting the core chatbot logic, managing the storage of statements, responses, and other conversational data.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.storage.StorageAdapter", + "reference_file": "chatterbot/storage/storage_adapter.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "chatterbot/storage/storage_adapter.py", + "chatterbot/storage/mongodb.py", + "chatterbot/storage/redis.py", + "chatterbot/storage/sql_storage.py", + "chatterbot/storage/django_storage.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/ext/sqlalchemy_app/models.py", + "chatterbot/vectorstores.py" + ], + "can_expand": true + }, + { + "name": "Training Module", + "description": "Responsible for the entire lifecycle of training the chatbot. It takes raw conversational data (corpus) and processes it to populate and update the chatbot's knowledge base, making it capable of generating responses.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.trainers.Trainer", + "reference_file": "chatterbot/trainers.py", + "reference_start_line": 14, + "reference_end_line": 77 + } + ], + "assigned_files": [ + "chatterbot/trainers.py" + ], + "can_expand": true + }, + { + "name": "Corpus Data Loader", + "description": "Dedicated to loading and managing conversational corpus data. It provides a standardized way to access and prepare datasets that are used by the Training Module to train the chatbot, primarily through functions like `load_corpus` and `list_corpus_files`.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.corpus", + "reference_file": "", + "reference_start_line": 1, + "reference_end_line": 10 + } + ], + "assigned_files": [ + "chatterbot/corpus.py" + ], + "can_expand": true + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [ + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py" + ], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "depends on", + "src_name": "Training Module", + "dst_name": "Corpus Data Loader" + }, + { + "relation": "writes to", + "src_name": "Training Module", + "dst_name": "Storage Adapters" + }, + { + "relation": "reads from", + "src_name": "Training Module", + "dst_name": "Storage Adapters" + } + ] +} diff --git a/.codeboarding/Data_Storage_Training.rst b/.codeboarding/Data_Storage_Training.rst new file mode 100644 index 000000000..dc3d2cb0d --- /dev/null +++ b/.codeboarding/Data_Storage_Training.rst @@ -0,0 +1,61 @@ +Data Storage Training +===================== + +.. mermaid:: + + graph LR + Storage_Adapters["Storage Adapters"] + Training_Module["Training Module"] + Corpus_Data_Loader["Corpus Data Loader"] + Unclassified["Unclassified"] + Training_Module -- "depends on" --> Corpus_Data_Loader + Training_Module -- "writes to" --> Storage_Adapters + Training_Module -- "reads from" --> Storage_Adapters + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot system is structured around three core components: the `Storage Adapters`, `Training Module`, and `Corpus Data Loader`. The `Corpus Data Loader` is responsible for providing raw conversational data, which is then consumed by the `Training Module`. The `Training Module` processes this data to learn and update the chatbot's knowledge base, persisting and retrieving conversational statements through the `Storage Adapters`. This design ensures a clear separation of concerns, allowing for flexible data storage and diverse training methodologies. + +Storage Adapters +^^^^^^^^^^^^^^^^ + +Provides an abstract interface for all data persistence and retrieval operations within ChatterBot. It allows for interchangeable storage backends (e.g., SQL, NoSQL, in-memory) without affecting the core chatbot logic, managing the storage of statements, responses, and other conversational data. + +**Related Classes/Methods**: + +* chatterbot.storage.StorageAdapter + +Training Module +^^^^^^^^^^^^^^^ + +Responsible for the entire lifecycle of training the chatbot. It takes raw conversational data (corpus) and processes it to populate and update the chatbot's knowledge base, making it capable of generating responses. + +**Related Classes/Methods**: + +* chatterbot.trainers.Trainer:14-77 + +Corpus Data Loader +^^^^^^^^^^^^^^^^^^ + +Dedicated to loading and managing conversational corpus data. It provides a standardized way to access and prepare datasets that are used by the Training Module to train the chatbot, primarily through functions like `load_corpus` and `list_corpus_files`. + +**Related Classes/Methods**: + +* chatterbot.corpus:1-10 + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/.codeboarding/Input_Output_Processors.json b/.codeboarding/Input_Output_Processors.json index 56e1909ab..86e40e191 100644 --- a/.codeboarding/Input_Output_Processors.json +++ b/.codeboarding/Input_Output_Processors.json @@ -11,9 +11,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Statement", @@ -25,9 +23,7 @@ "reference_start_line": 62, "reference_end_line": 118 } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Preprocessors", @@ -51,11 +47,7 @@ "reference_start_line": 38, "reference_end_line": 47 } - ], - "assigned_files": [ - "chatterbot/preprocessors.py" - ], - "can_expand": false + ] }, { "name": "LogicAdapter", @@ -67,9 +59,7 @@ "reference_start_line": 10, "reference_end_line": 136 } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Parsing Utilities", @@ -81,20 +71,12 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [ - "chatterbot/parsing.py" - ], - "can_expand": true + ] }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", - "referenced_source_code": [], - "assigned_files": [ - "chatterbot/languages.py" - ], - "can_expand": false + "referenced_source_code": [] } ], "components_relations": [ diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 6dedb5746..a993d3697 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,13 +13,6 @@ } ], "assigned_files": [ - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/terminal_mongo_example.py", - "examples/tkinter_gui.py", - "examples/django_example/django_example/views.py", - "examples/learning_feedback_example.py", - "chatterbot/__main__.py", "chatterbot/conversation.py", "chatterbot/chatterbot.py" ], @@ -49,21 +42,17 @@ } ], "assigned_files": [ - "examples/specific_response_example.py", - "examples/math_and_time.py", - "examples/convert_units.py", - "examples/default_response_example.py", - "chatterbot/search.py", "chatterbot/response_selection.py", - "chatterbot/vectorstores.py", - "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", "chatterbot/logic/specific_response.py", - "chatterbot/logic/time_adapter.py" + "chatterbot/logic/time_adapter.py", + "chatterbot/search.py", + "chatterbot/tagging.py", + "chatterbot/filters.py" ], "can_expand": true }, @@ -91,24 +80,44 @@ } ], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/training_example_ubuntu_corpus.py", - "examples/export_example.py", - "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", - "chatterbot/tagging.py", "chatterbot/trainers.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", - "chatterbot/storage/django_storage.py" + "chatterbot/storage/django_storage.py", + "chatterbot/vectorstores.py" ], "can_expand": true }, @@ -131,8 +140,7 @@ ], "assigned_files": [ "chatterbot/parsing.py", - "chatterbot/preprocessors.py", - "chatterbot/languages.py" + "chatterbot/preprocessors.py" ], "can_expand": true }, @@ -148,8 +156,6 @@ } ], "assigned_files": [ - "examples/openai_example.py", - "examples/ollama_example.py", "chatterbot/llm.py" ], "can_expand": true @@ -159,56 +165,57 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/terminal_mongo_example.py", + "examples/specific_response_example.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/math_and_time.py", + "examples/openai_example.py", + "examples/training_example_ubuntu_corpus.py", + "examples/convert_units.py", + "examples/ollama_example.py", + "examples/export_example.py", + "examples/default_response_example.py", + "examples/tkinter_gui.py", + "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", "examples/django_example/django_example/settings.py", + "examples/django_example/django_example/views.py", "examples/django_example/django_example/wsgi.py", "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", + "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", "chatterbot/__init__.py", "chatterbot/adapters.py", + "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/components.py", "chatterbot/exceptions.py", + "chatterbot/languages.py", "chatterbot/ext/__init__.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/storage/__init__.py", "chatterbot/logic/__init__.py" ], "can_expand": false + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false } ], "components_relations": [ diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 01bfdafbf..4cb1ec4b1 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "85242a8b49fa0e0d4f6323d0acff362728bb0f0b", + "commit_hash": "1a69a48cd8505d4948ce7c7f51c34963878b4dae", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 30e33ceb5..555c6db0b 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -10,6 +10,7 @@ Overview Input_Output_Processors["Input/Output Processors"] LLM_Integration["LLM Integration"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -18,6 +19,8 @@ Overview Data_Storage_Training -- "Provides Stored Data To" --> Chatbot_Core_Engine Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine + click Chatbot_Core_Engine href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Chatbot_Core_Engine.html" "Details" + click Data_Storage_Training href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Data_Storage_Training.html" "Details" click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" | |codeboarding-badge| |demo-badge| |contact-badge| @@ -37,6 +40,8 @@ The ChatterBot architecture is designed around a central `Chatbot Core Engine` t Chatbot Core Engine ^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + The central orchestrator, managing conversation flow, input processing, and response generation. It coordinates all other components. **Related Classes/Methods**: @@ -57,6 +62,8 @@ A collection of specialized modules that determine how the chatbot responds to s Data Storage & Training ^^^^^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + Manages the persistence and retrieval of conversational data (statements, responses), handles the entire training lifecycle, and loads corpus data. **Related Classes/Methods**: @@ -92,3 +99,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/Chatbot_Core_Engine.rst b/docs/architecture/Chatbot_Core_Engine.rst new file mode 100644 index 000000000..8d8ca5fbf --- /dev/null +++ b/docs/architecture/Chatbot_Core_Engine.rst @@ -0,0 +1,96 @@ +Chatbot Core Engine +=================== + +.. mermaid:: + + graph LR + Document_Ingestion["Document Ingestion"] + Text_Splitter["Text Splitter"] + Vector_Store["Vector Store"] + Embeddings_Model["Embeddings Model"] + Language_Model_LLM_["Language Model (LLM)"] + Retrieval_Chain["Retrieval Chain"] + Unclassified["Unclassified"] + Document_Ingestion -- "loads documents into" --> Text_Splitter + Text_Splitter -- "splits text for" --> Embeddings_Model + Embeddings_Model -- "generates embeddings for" --> Vector_Store + Vector_Store -- "stores embeddings from" --> Embeddings_Model + Vector_Store -- "retrieves context for" --> Retrieval_Chain + Retrieval_Chain -- "uses" --> Language_Model_LLM_ + Language_Model_LLM_ -- "answers queries using" --> Retrieval_Chain + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +This graph represents the core functionality of a document processing and question-answering system. The main flow involves ingesting documents, processing them into a searchable format, and then using a language model to answer user queries based on the ingested content. Its purpose is to provide an intelligent interface for users to retrieve information from a collection of documents. + +Document Ingestion +^^^^^^^^^^^^^^^^^^ + +Handles the loading and initial processing of various document types. + +**Related Classes/Methods**: + +* langchain_community.document_loaders.pdf.PyPDFLoader +* langchain_community.document_loaders.csv_loader.CSVLoader + +Text Splitter +^^^^^^^^^^^^^ + +Breaks down large documents into smaller, manageable chunks for efficient processing and embedding. + +**Related Classes/Methods**: + +* langchain.text_splitter.RecursiveCharacterTextSplitter + +Vector Store +^^^^^^^^^^^^ + +Stores and retrieves document embeddings, enabling semantic search. + +**Related Classes/Methods**: + +* langchain_community.vectorstores.chroma.Chroma + +Embeddings Model +^^^^^^^^^^^^^^^^ + +Generates numerical representations (embeddings) of text chunks. + +**Related Classes/Methods**: + +* langchain_community.embeddings.ollama.OllamaEmbeddings + +Language Model (LLM) +^^^^^^^^^^^^^^^^^^^^ + +Processes user queries and generates answers based on retrieved context. + +**Related Classes/Methods**: + +* langchain_community.llms.ollama.Ollama + +Retrieval Chain +^^^^^^^^^^^^^^^ + +Orchestrates the retrieval of relevant document chunks and passes them to the LLM for answer generation. + +**Related Classes/Methods**: + +* langchain.chains.retrieval.create_retrieval_chain + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/Data_Storage_Training.rst b/docs/architecture/Data_Storage_Training.rst new file mode 100644 index 000000000..dc3d2cb0d --- /dev/null +++ b/docs/architecture/Data_Storage_Training.rst @@ -0,0 +1,61 @@ +Data Storage Training +===================== + +.. mermaid:: + + graph LR + Storage_Adapters["Storage Adapters"] + Training_Module["Training Module"] + Corpus_Data_Loader["Corpus Data Loader"] + Unclassified["Unclassified"] + Training_Module -- "depends on" --> Corpus_Data_Loader + Training_Module -- "writes to" --> Storage_Adapters + Training_Module -- "reads from" --> Storage_Adapters + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The ChatterBot system is structured around three core components: the `Storage Adapters`, `Training Module`, and `Corpus Data Loader`. The `Corpus Data Loader` is responsible for providing raw conversational data, which is then consumed by the `Training Module`. The `Training Module` processes this data to learn and update the chatbot's knowledge base, persisting and retrieving conversational statements through the `Storage Adapters`. This design ensures a clear separation of concerns, allowing for flexible data storage and diverse training methodologies. + +Storage Adapters +^^^^^^^^^^^^^^^^ + +Provides an abstract interface for all data persistence and retrieval operations within ChatterBot. It allows for interchangeable storage backends (e.g., SQL, NoSQL, in-memory) without affecting the core chatbot logic, managing the storage of statements, responses, and other conversational data. + +**Related Classes/Methods**: + +* chatterbot.storage.StorageAdapter + +Training Module +^^^^^^^^^^^^^^^ + +Responsible for the entire lifecycle of training the chatbot. It takes raw conversational data (corpus) and processes it to populate and update the chatbot's knowledge base, making it capable of generating responses. + +**Related Classes/Methods**: + +* chatterbot.trainers.Trainer:14-77 + +Corpus Data Loader +^^^^^^^^^^^^^^^^^^ + +Dedicated to loading and managing conversational corpus data. It provides a standardized way to access and prepare datasets that are used by the Training Module to train the chatbot, primarily through functions like `load_corpus` and `list_corpus_files`. + +**Related Classes/Methods**: + +* chatterbot.corpus:1-10 + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 30e33ceb5..555c6db0b 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -10,6 +10,7 @@ Overview Input_Output_Processors["Input/Output Processors"] LLM_Integration["LLM Integration"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -18,6 +19,8 @@ Overview Data_Storage_Training -- "Provides Stored Data To" --> Chatbot_Core_Engine Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine + click Chatbot_Core_Engine href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Chatbot_Core_Engine.html" "Details" + click Data_Storage_Training href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Data_Storage_Training.html" "Details" click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" | |codeboarding-badge| |demo-badge| |contact-badge| @@ -37,6 +40,8 @@ The ChatterBot architecture is designed around a central `Chatbot Core Engine` t Chatbot Core Engine ^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + The central orchestrator, managing conversation flow, input processing, and response generation. It coordinates all other components. **Related Classes/Methods**: @@ -57,6 +62,8 @@ A collection of specialized modules that determine how the chatbot responds to s Data Storage & Training ^^^^^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + Manages the persistence and retrieval of conversational data (statements, responses), handles the entire training lifecycle, and loads corpus data. **Related Classes/Methods**: @@ -92,3 +99,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 8d77b37185f9f9ea313a90949b26d49389cab8b8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 25 Oct 2025 20:23:54 +0000 Subject: [PATCH 05/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 4 - JSON files created/updated: 5 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/Chatbot_Core_Engine.json | 31 +++---------- .codeboarding/Data_Storage_Training.json | 58 ++---------------------- .codeboarding/analysis.json | 41 ++++++++++------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++ docs/architecture/overview.rst | 8 ++++ 6 files changed, 52 insertions(+), 96 deletions(-) diff --git a/.codeboarding/Chatbot_Core_Engine.json b/.codeboarding/Chatbot_Core_Engine.json index 65d923705..49cefdc6a 100644 --- a/.codeboarding/Chatbot_Core_Engine.json +++ b/.codeboarding/Chatbot_Core_Engine.json @@ -17,9 +17,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": false + ] }, { "name": "Text Splitter", @@ -31,9 +29,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Vector Store", @@ -45,9 +41,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Embeddings Model", @@ -59,9 +53,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": false + ] }, { "name": "Language Model (LLM)", @@ -73,9 +65,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Retrieval Chain", @@ -87,19 +77,12 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": false + ] }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", - "referenced_source_code": [], - "assigned_files": [ - "chatterbot/conversation.py", - "chatterbot/chatterbot.py" - ], - "can_expand": false + "referenced_source_code": [] } ], "components_relations": [ diff --git a/.codeboarding/Data_Storage_Training.json b/.codeboarding/Data_Storage_Training.json index 5780918d2..638c5d70d 100644 --- a/.codeboarding/Data_Storage_Training.json +++ b/.codeboarding/Data_Storage_Training.json @@ -11,41 +11,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [ - "chatterbot/storage/storage_adapter.py", - "chatterbot/storage/mongodb.py", - "chatterbot/storage/redis.py", - "chatterbot/storage/sql_storage.py", - "chatterbot/storage/django_storage.py", - "chatterbot/ext/django_chatterbot/models.py", - "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/ext/sqlalchemy_app/models.py", - "chatterbot/vectorstores.py" - ], - "can_expand": true + ] }, { "name": "Training Module", @@ -57,11 +23,7 @@ "reference_start_line": 14, "reference_end_line": 77 } - ], - "assigned_files": [ - "chatterbot/trainers.py" - ], - "can_expand": true + ] }, { "name": "Corpus Data Loader", @@ -73,24 +35,12 @@ "reference_start_line": 1, "reference_end_line": 10 } - ], - "assigned_files": [ - "chatterbot/corpus.py" - ], - "can_expand": true + ] }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", - "referenced_source_code": [], - "assigned_files": [ - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py" - ], - "can_expand": false + "referenced_source_code": [] } ], "components_relations": [ diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index a993d3697..2682a28de 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -14,6 +14,7 @@ ], "assigned_files": [ "chatterbot/conversation.py", + "chatterbot/components.py", "chatterbot/chatterbot.py" ], "can_expand": true @@ -42,6 +43,7 @@ } ], "assigned_files": [ + "chatterbot/search.py", "chatterbot/response_selection.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", @@ -49,10 +51,7 @@ "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", "chatterbot/logic/specific_response.py", - "chatterbot/logic/time_adapter.py", - "chatterbot/search.py", - "chatterbot/tagging.py", - "chatterbot/filters.py" + "chatterbot/logic/time_adapter.py" ], "can_expand": true }, @@ -81,16 +80,11 @@ ], "assigned_files": [ "chatterbot/corpus.py", + "chatterbot/vectorstores.py", "chatterbot/trainers.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -110,14 +104,12 @@ "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", - "chatterbot/storage/django_storage.py", - "chatterbot/vectorstores.py" + "chatterbot/storage/django_storage.py" ], "can_expand": true }, @@ -139,8 +131,11 @@ } ], "assigned_files": [ + "chatterbot/tagging.py", "chatterbot/parsing.py", - "chatterbot/preprocessors.py" + "chatterbot/preprocessors.py", + "chatterbot/filters.py", + "chatterbot/languages.py" ], "can_expand": true }, @@ -158,7 +153,7 @@ "assigned_files": [ "chatterbot/llm.py" ], - "can_expand": true + "can_expand": false }, { "name": "Unclassified", @@ -201,15 +196,27 @@ "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", - "chatterbot/components.py", "chatterbot/exceptions.py", - "chatterbot/languages.py", "chatterbot/ext/__init__.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/storage/__init__.py", "chatterbot/logic/__init__.py" ], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 4cb1ec4b1..26b5a101c 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "1a69a48cd8505d4948ce7c7f51c34963878b4dae", + "commit_hash": "95fe9eac1cab27669e200424ddf3a063cf91ed3d", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 555c6db0b..42157526e 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -11,6 +11,7 @@ Overview LLM_Integration["LLM Integration"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -106,3 +107,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 555c6db0b..42157526e 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -11,6 +11,7 @@ Overview LLM_Integration["LLM Integration"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -106,3 +107,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 0d4224bec87befda44520e946a8a7244d3897801 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 8 Nov 2025 20:27:03 +0000 Subject: [PATCH 06/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/LLM_Integration.json | 109 +++++++++++++++++ .codeboarding/LLM_Integration.rst | 75 ++++++++++++ .codeboarding/Logic_Response_Adapters.json | 110 ++++++++++++++++++ .codeboarding/Logic_Response_Adapters.rst | 64 ++++++++++ .codeboarding/analysis.json | 17 ++- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 14 +++ docs/architecture/LLM_Integration.rst | 75 ++++++++++++ docs/architecture/Logic_Response_Adapters.rst | 64 ++++++++++ docs/architecture/overview.rst | 14 +++ 10 files changed, 538 insertions(+), 6 deletions(-) create mode 100644 .codeboarding/LLM_Integration.json create mode 100644 .codeboarding/LLM_Integration.rst create mode 100644 .codeboarding/Logic_Response_Adapters.json create mode 100644 .codeboarding/Logic_Response_Adapters.rst create mode 100644 docs/architecture/LLM_Integration.rst create mode 100644 docs/architecture/Logic_Response_Adapters.rst diff --git a/.codeboarding/LLM_Integration.json b/.codeboarding/LLM_Integration.json new file mode 100644 index 000000000..323f4ef7a --- /dev/null +++ b/.codeboarding/LLM_Integration.json @@ -0,0 +1,109 @@ +{ + "description": "This graph represents the core functionality of a system that processes user queries, generates responses using a language model, and interacts with external tools. The main flow involves receiving a query, parsing it, invoking a language model to determine the appropriate action, executing that action (which might involve using a tool), and finally formatting and returning the response to the user. Its purpose is to provide a flexible and extensible framework for building AI-powered applications that can understand and act upon user requests.", + "components": [ + { + "name": "Query Processor", + "description": "Handles incoming user queries, including parsing and initial validation.", + "referenced_source_code": [ + { + "qualified_name": "QueryParser:parse", + "reference_file": "chatterbot/parsing.py", + "reference_start_line": 302, + "reference_end_line": 310 + } + ], + "assigned_files": [], + "can_expand": false + }, + { + "name": "Language Model Interface", + "description": "Manages interactions with the underlying language model, sending prompts and receiving generated text.", + "referenced_source_code": [ + { + "qualified_name": "LLMClient:send_prompt", + "reference_file": "chatterbot/llm.py", + "reference_start_line": 62, + "reference_end_line": 86 + }, + { + "qualified_name": "LLMClient:receive_response", + "reference_file": "chatterbot/llm.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "chatterbot/llm.py" + ], + "can_expand": false + }, + { + "name": "Tool Executor", + "description": "Executes specific tools based on the language model's output, handling tool invocation and result retrieval.", + "referenced_source_code": [ + { + "qualified_name": "ToolRegistry:get_tool", + "reference_file": "tool_executor.py", + "reference_start_line": null, + "reference_end_line": null + }, + { + "qualified_name": "Tool:execute", + "reference_file": "tool_executor.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": true + }, + { + "name": "Response Formatter", + "description": "Formats the final response to be sent back to the user, potentially combining information from the language model and tool outputs.", + "referenced_source_code": [ + { + "qualified_name": "ResponseBuilder:build", + "reference_file": "chatterbot/response_selection.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [], + "can_expand": false + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "sends queries to", + "src_name": "Query Processor", + "dst_name": "Language Model Interface" + }, + { + "relation": "receives output from", + "src_name": "Language Model Interface", + "dst_name": "Tool Executor" + }, + { + "relation": "invokes", + "src_name": "Tool Executor", + "dst_name": "Tool" + }, + { + "relation": "sends results to", + "src_name": "Tool Executor", + "dst_name": "Response Formatter" + }, + { + "relation": "returns formatted response from", + "src_name": "Response Formatter", + "dst_name": "Query Processor" + } + ] +} diff --git a/.codeboarding/LLM_Integration.rst b/.codeboarding/LLM_Integration.rst new file mode 100644 index 000000000..7c22f50e2 --- /dev/null +++ b/.codeboarding/LLM_Integration.rst @@ -0,0 +1,75 @@ +Llm Integration +=============== + +.. mermaid:: + + graph LR + Query_Processor["Query Processor"] + Language_Model_Interface["Language Model Interface"] + Tool_Executor["Tool Executor"] + Response_Formatter["Response Formatter"] + Unclassified["Unclassified"] + Query_Processor -- "sends queries to" --> Language_Model_Interface + Language_Model_Interface -- "receives output from" --> Tool_Executor + Tool_Executor -- "invokes" --> Tool + Tool_Executor -- "sends results to" --> Response_Formatter + Response_Formatter -- "returns formatted response from" --> Query_Processor + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +This graph represents the core functionality of a system that processes user queries, generates responses using a language model, and interacts with external tools. The main flow involves receiving a query, parsing it, invoking a language model to determine the appropriate action, executing that action (which might involve using a tool), and finally formatting and returning the response to the user. Its purpose is to provide a flexible and extensible framework for building AI-powered applications that can understand and act upon user requests. + +Query Processor +^^^^^^^^^^^^^^^ + +Handles incoming user queries, including parsing and initial validation. + +**Related Classes/Methods**: + +* QueryParser:parse:302-310 + +Language Model Interface +^^^^^^^^^^^^^^^^^^^^^^^^ + +Manages interactions with the underlying language model, sending prompts and receiving generated text. + +**Related Classes/Methods**: + +* LLMClient:send_prompt:62-86 +* LLMClient:receive_response + +Tool Executor +^^^^^^^^^^^^^ + +Executes specific tools based on the language model's output, handling tool invocation and result retrieval. + +**Related Classes/Methods**: + +* ToolRegistry:get_tool +* Tool:execute + +Response Formatter +^^^^^^^^^^^^^^^^^^ + +Formats the final response to be sent back to the user, potentially combining information from the language model and tool outputs. + +**Related Classes/Methods**: + +* ResponseBuilder:build + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/.codeboarding/Logic_Response_Adapters.json b/.codeboarding/Logic_Response_Adapters.json new file mode 100644 index 000000000..a2c39ea52 --- /dev/null +++ b/.codeboarding/Logic_Response_Adapters.json @@ -0,0 +1,110 @@ +{ + "description": "The `chatterbot` system's core conversational flow is orchestrated by `Logic Adapters` and `Response Selection`. `Logic Adapters` (represented by `chatterbot.logic.LogicAdapter` and its specialized subclasses) are responsible for interpreting user input, often leveraging `Comparisons` (such as `chatterbot.comparisons.Comparator` and its implementations) to find relevant matches within the chatbot's knowledge base. Each adapter proposes potential responses with confidence scores. These diverse responses are then consolidated by the `Response Selection` component (functions within `chatterbot.response_selection`), which applies a defined strategy to choose the most appropriate single reply, ensuring a coherent and effective conversational output.", + "components": [ + { + "name": "Logic Adapters", + "description": "This component comprises a collection of specialized modules, each implementing distinct conversational logic. Their primary role is to process user input, compare it against known statements (often utilizing comparison logic from `chatterbot.comparisons.Comparator` and its subclasses), and generate a list of potential responses based on their specific algorithms and the chatbot's knowledge base. This component embodies the \"Adapter Pattern\" by allowing different logic strategies to be plugged in and executed based on the conversational context.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.logic.LogicAdapter", + "reference_file": "", + "reference_start_line": null, + "reference_end_line": null + }, + { + "qualified_name": "chatterbot.comparisons.Comparator", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": 10, + "reference_end_line": 34 + } + ], + "assigned_files": [ + "chatterbot/search.py", + "chatterbot/logic/unit_conversion.py", + "chatterbot/logic/mathematical_evaluation.py", + "chatterbot/logic/logic_adapter.py", + "chatterbot/logic/best_match.py", + "chatterbot/logic/specific_response.py", + "chatterbot/logic/time_adapter.py" + ], + "can_expand": true + }, + { + "name": "Response Selection", + "description": "This component acts as an arbiter, receiving multiple candidate responses from various `Logic Adapters`. Its responsibility is to apply a selection algorithm (such as `get_first_response`, `get_most_frequent_response`, or `get_random_response` from `chatterbot.response_selection`) to evaluate these candidates and determine the single most appropriate response to be returned to the user. This component ensures that the chatbot provides a coherent and optimal reply, even when multiple logic paths suggest different answers, thereby orchestrating the final output.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.response_selection", + "reference_file": "chatterbot/response_selection.py", + "reference_start_line": null, + "reference_end_line": null + } + ], + "assigned_files": [ + "chatterbot/response_selection.py" + ], + "can_expand": true + }, + { + "name": "Comparisons", + "description": "This component encapsulates the logic for comparing statements, primarily used by `Logic Adapters` to assess similarity between user input and known statements. It includes various comparison algorithms like Levenshtein Distance, Spacy Similarity, and Jaccard Similarity, all stemming from `chatterbot.comparisons.Comparator`.", + "referenced_source_code": [ + { + "qualified_name": "chatterbot.comparisons.Comparator", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": 10, + "reference_end_line": 34 + }, + { + "qualified_name": "chatterbot.comparisons.LevenshteinDistance", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": 37, + "reference_end_line": 71 + }, + { + "qualified_name": "chatterbot.comparisons.SpacySimilarity", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": 74, + "reference_end_line": 119 + }, + { + "qualified_name": "chatterbot.comparisons.JaccardSimilarity", + "reference_file": "chatterbot/comparisons.py", + "reference_start_line": 122, + "reference_end_line": 182 + } + ], + "assigned_files": [ + "chatterbot/comparisons.py" + ], + "can_expand": true + }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [ + "chatterbot/vectorstores.py", + "chatterbot/filters.py" + ], + "can_expand": false + } + ], + "components_relations": [ + { + "relation": "uses", + "src_name": "Logic Adapters", + "dst_name": "Comparisons" + }, + { + "relation": "provides candidate responses to", + "src_name": "Logic Adapters", + "dst_name": "Response Selection" + }, + { + "relation": "selects final response from", + "src_name": "Response Selection", + "dst_name": "Logic Adapters" + } + ] +} diff --git a/.codeboarding/Logic_Response_Adapters.rst b/.codeboarding/Logic_Response_Adapters.rst new file mode 100644 index 000000000..2bab4e23d --- /dev/null +++ b/.codeboarding/Logic_Response_Adapters.rst @@ -0,0 +1,64 @@ +Logic Response Adapters +======================= + +.. mermaid:: + + graph LR + Logic_Adapters["Logic Adapters"] + Response_Selection["Response Selection"] + Comparisons["Comparisons"] + Unclassified["Unclassified"] + Logic_Adapters -- "uses" --> Comparisons + Logic_Adapters -- "provides candidate responses to" --> Response_Selection + Response_Selection -- "selects final response from" --> Logic_Adapters + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The `chatterbot` system's core conversational flow is orchestrated by `Logic Adapters` and `Response Selection`. `Logic Adapters` (represented by `chatterbot.logic.LogicAdapter` and its specialized subclasses) are responsible for interpreting user input, often leveraging `Comparisons` (such as `chatterbot.comparisons.Comparator` and its implementations) to find relevant matches within the chatbot's knowledge base. Each adapter proposes potential responses with confidence scores. These diverse responses are then consolidated by the `Response Selection` component (functions within `chatterbot.response_selection`), which applies a defined strategy to choose the most appropriate single reply, ensuring a coherent and effective conversational output. + +Logic Adapters +^^^^^^^^^^^^^^ + +This component comprises a collection of specialized modules, each implementing distinct conversational logic. Their primary role is to process user input, compare it against known statements (often utilizing comparison logic from `chatterbot.comparisons.Comparator` and its subclasses), and generate a list of potential responses based on their specific algorithms and the chatbot's knowledge base. This component embodies the "Adapter Pattern" by allowing different logic strategies to be plugged in and executed based on the conversational context. + +**Related Classes/Methods**: + +* chatterbot.comparisons.Comparator:10-34 + +Response Selection +^^^^^^^^^^^^^^^^^^ + +This component acts as an arbiter, receiving multiple candidate responses from various `Logic Adapters`. Its responsibility is to apply a selection algorithm (such as `get_first_response`, `get_most_frequent_response`, or `get_random_response` from `chatterbot.response_selection`) to evaluate these candidates and determine the single most appropriate response to be returned to the user. This component ensures that the chatbot provides a coherent and optimal reply, even when multiple logic paths suggest different answers, thereby orchestrating the final output. + +**Related Classes/Methods**: + +* chatterbot.response_selection + +Comparisons +^^^^^^^^^^^ + +This component encapsulates the logic for comparing statements, primarily used by `Logic Adapters` to assess similarity between user input and known statements. It includes various comparison algorithms like Levenshtein Distance, Spacy Similarity, and Jaccard Similarity, all stemming from `chatterbot.comparisons.Comparator`. + +**Related Classes/Methods**: + +* chatterbot.comparisons.Comparator:10-34 +* chatterbot.comparisons.LevenshteinDistance:37-71 +* chatterbot.comparisons.SpacySimilarity:74-119 +* chatterbot.comparisons.JaccardSimilarity:122-182 + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 2682a28de..adebaedca 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -45,6 +45,8 @@ "assigned_files": [ "chatterbot/search.py", "chatterbot/response_selection.py", + "chatterbot/vectorstores.py", + "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/mathematical_evaluation.py", @@ -80,7 +82,6 @@ ], "assigned_files": [ "chatterbot/corpus.py", - "chatterbot/vectorstores.py", "chatterbot/trainers.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", @@ -133,9 +134,7 @@ "assigned_files": [ "chatterbot/tagging.py", "chatterbot/parsing.py", - "chatterbot/preprocessors.py", - "chatterbot/filters.py", - "chatterbot/languages.py" + "chatterbot/preprocessors.py" ], "can_expand": true }, @@ -153,7 +152,7 @@ "assigned_files": [ "chatterbot/llm.py" ], - "can_expand": false + "can_expand": true }, { "name": "Unclassified", @@ -197,6 +196,7 @@ "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", + "chatterbot/languages.py", "chatterbot/ext/__init__.py", "chatterbot/ext/django_chatterbot/__init__.py", "chatterbot/ext/django_chatterbot/apps.py", @@ -217,6 +217,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 26b5a101c..8f2757357 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "95fe9eac1cab27669e200424ddf3a063cf91ed3d", + "commit_hash": "8d77b37185f9f9ea313a90949b26d49389cab8b8", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 42157526e..4fef2ac87 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -12,6 +12,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -21,8 +22,10 @@ Overview Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine click Chatbot_Core_Engine href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Chatbot_Core_Engine.html" "Details" + click Logic_Response_Adapters href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Logic_Response_Adapters.html" "Details" click Data_Storage_Training href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Data_Storage_Training.html" "Details" click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" + click LLM_Integration href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/LLM_Integration.html" "Details" | |codeboarding-badge| |demo-badge| |contact-badge| @@ -52,6 +55,8 @@ The central orchestrator, managing conversation flow, input processing, and resp Logic & Response Adapters ^^^^^^^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + A collection of specialized modules that determine how the chatbot responds to specific types of input, including statement comparison and response selection logic. **Related Classes/Methods**: @@ -88,6 +93,8 @@ Responsible for preprocessing raw user input (e.g., cleaning whitespace, parsing LLM Integration ^^^^^^^^^^^^^^^ +:ref:`Expand ` + Provides an abstract interface for integrating Large Language Models, allowing ChatterBot to leverage advanced generative capabilities for responses. **Related Classes/Methods**: @@ -114,3 +121,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/LLM_Integration.rst b/docs/architecture/LLM_Integration.rst new file mode 100644 index 000000000..7c22f50e2 --- /dev/null +++ b/docs/architecture/LLM_Integration.rst @@ -0,0 +1,75 @@ +Llm Integration +=============== + +.. mermaid:: + + graph LR + Query_Processor["Query Processor"] + Language_Model_Interface["Language Model Interface"] + Tool_Executor["Tool Executor"] + Response_Formatter["Response Formatter"] + Unclassified["Unclassified"] + Query_Processor -- "sends queries to" --> Language_Model_Interface + Language_Model_Interface -- "receives output from" --> Tool_Executor + Tool_Executor -- "invokes" --> Tool + Tool_Executor -- "sends results to" --> Response_Formatter + Response_Formatter -- "returns formatted response from" --> Query_Processor + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +This graph represents the core functionality of a system that processes user queries, generates responses using a language model, and interacts with external tools. The main flow involves receiving a query, parsing it, invoking a language model to determine the appropriate action, executing that action (which might involve using a tool), and finally formatting and returning the response to the user. Its purpose is to provide a flexible and extensible framework for building AI-powered applications that can understand and act upon user requests. + +Query Processor +^^^^^^^^^^^^^^^ + +Handles incoming user queries, including parsing and initial validation. + +**Related Classes/Methods**: + +* QueryParser:parse:302-310 + +Language Model Interface +^^^^^^^^^^^^^^^^^^^^^^^^ + +Manages interactions with the underlying language model, sending prompts and receiving generated text. + +**Related Classes/Methods**: + +* LLMClient:send_prompt:62-86 +* LLMClient:receive_response + +Tool Executor +^^^^^^^^^^^^^ + +Executes specific tools based on the language model's output, handling tool invocation and result retrieval. + +**Related Classes/Methods**: + +* ToolRegistry:get_tool +* Tool:execute + +Response Formatter +^^^^^^^^^^^^^^^^^^ + +Formats the final response to be sent back to the user, potentially combining information from the language model and tool outputs. + +**Related Classes/Methods**: + +* ResponseBuilder:build + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/Logic_Response_Adapters.rst b/docs/architecture/Logic_Response_Adapters.rst new file mode 100644 index 000000000..2bab4e23d --- /dev/null +++ b/docs/architecture/Logic_Response_Adapters.rst @@ -0,0 +1,64 @@ +Logic Response Adapters +======================= + +.. mermaid:: + + graph LR + Logic_Adapters["Logic Adapters"] + Response_Selection["Response Selection"] + Comparisons["Comparisons"] + Unclassified["Unclassified"] + Logic_Adapters -- "uses" --> Comparisons + Logic_Adapters -- "provides candidate responses to" --> Response_Selection + Response_Selection -- "selects final response from" --> Logic_Adapters + +| |codeboarding-badge| |demo-badge| |contact-badge| + +.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square + :target: https://github.com/CodeBoarding/CodeBoarding +.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square + :target: https://www.codeboarding.org/demo +.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square + :target: mailto:contact@codeboarding.org + +Details +------- + +The `chatterbot` system's core conversational flow is orchestrated by `Logic Adapters` and `Response Selection`. `Logic Adapters` (represented by `chatterbot.logic.LogicAdapter` and its specialized subclasses) are responsible for interpreting user input, often leveraging `Comparisons` (such as `chatterbot.comparisons.Comparator` and its implementations) to find relevant matches within the chatbot's knowledge base. Each adapter proposes potential responses with confidence scores. These diverse responses are then consolidated by the `Response Selection` component (functions within `chatterbot.response_selection`), which applies a defined strategy to choose the most appropriate single reply, ensuring a coherent and effective conversational output. + +Logic Adapters +^^^^^^^^^^^^^^ + +This component comprises a collection of specialized modules, each implementing distinct conversational logic. Their primary role is to process user input, compare it against known statements (often utilizing comparison logic from `chatterbot.comparisons.Comparator` and its subclasses), and generate a list of potential responses based on their specific algorithms and the chatbot's knowledge base. This component embodies the "Adapter Pattern" by allowing different logic strategies to be plugged in and executed based on the conversational context. + +**Related Classes/Methods**: + +* chatterbot.comparisons.Comparator:10-34 + +Response Selection +^^^^^^^^^^^^^^^^^^ + +This component acts as an arbiter, receiving multiple candidate responses from various `Logic Adapters`. Its responsibility is to apply a selection algorithm (such as `get_first_response`, `get_most_frequent_response`, or `get_random_response` from `chatterbot.response_selection`) to evaluate these candidates and determine the single most appropriate response to be returned to the user. This component ensures that the chatbot provides a coherent and optimal reply, even when multiple logic paths suggest different answers, thereby orchestrating the final output. + +**Related Classes/Methods**: + +* chatterbot.response_selection + +Comparisons +^^^^^^^^^^^ + +This component encapsulates the logic for comparing statements, primarily used by `Logic Adapters` to assess similarity between user input and known statements. It includes various comparison algorithms like Levenshtein Distance, Spacy Similarity, and Jaccard Similarity, all stemming from `chatterbot.comparisons.Comparator`. + +**Related Classes/Methods**: + +* chatterbot.comparisons.Comparator:10-34 +* chatterbot.comparisons.LevenshteinDistance:37-71 +* chatterbot.comparisons.SpacySimilarity:74-119 +* chatterbot.comparisons.JaccardSimilarity:122-182 + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 42157526e..4fef2ac87 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -12,6 +12,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -21,8 +22,10 @@ Overview Data_Storage_Training -- "Provides Knowledge Base Data To" --> Logic_Response_Adapters LLM_Integration -- "Returns Generative Response To" --> Chatbot_Core_Engine click Chatbot_Core_Engine href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Chatbot_Core_Engine.html" "Details" + click Logic_Response_Adapters href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Logic_Response_Adapters.html" "Details" click Data_Storage_Training href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Data_Storage_Training.html" "Details" click Input_Output_Processors href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/Input_Output_Processors.html" "Details" + click LLM_Integration href "https://github.com/CodeBoarding/ChatterBot/blob/master/.codeboarding/LLM_Integration.html" "Details" | |codeboarding-badge| |demo-badge| |contact-badge| @@ -52,6 +55,8 @@ The central orchestrator, managing conversation flow, input processing, and resp Logic & Response Adapters ^^^^^^^^^^^^^^^^^^^^^^^^^ +:ref:`Expand ` + A collection of specialized modules that determine how the chatbot responds to specific types of input, including statement comparison and response selection logic. **Related Classes/Methods**: @@ -88,6 +93,8 @@ Responsible for preprocessing raw user input (e.g., cleaning whitespace, parsing LLM Integration ^^^^^^^^^^^^^^^ +:ref:`Expand ` + Provides an abstract interface for integrating Large Language Models, allowing ChatterBot to leverage advanced generative capabilities for responses. **Related Classes/Methods**: @@ -114,3 +121,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 8312afcbb7a5e9fc2fd4670efa9f6cb092b14ef3 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 15 Nov 2025 20:22:45 +0000 Subject: [PATCH 07/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/LLM_Integration.json | 22 ++------- .codeboarding/Logic_Response_Adapters.json | 31 ++---------- .codeboarding/analysis.json | 57 ++++++++++++---------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 +++ docs/architecture/overview.rst | 8 +++ 6 files changed, 58 insertions(+), 70 deletions(-) diff --git a/.codeboarding/LLM_Integration.json b/.codeboarding/LLM_Integration.json index 323f4ef7a..59c566b68 100644 --- a/.codeboarding/LLM_Integration.json +++ b/.codeboarding/LLM_Integration.json @@ -11,9 +11,7 @@ "reference_start_line": 302, "reference_end_line": 310 } - ], - "assigned_files": [], - "can_expand": false + ] }, { "name": "Language Model Interface", @@ -31,11 +29,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [ - "chatterbot/llm.py" - ], - "can_expand": false + ] }, { "name": "Tool Executor", @@ -53,9 +47,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": true + ] }, { "name": "Response Formatter", @@ -67,16 +59,12 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [], - "can_expand": false + ] }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", - "referenced_source_code": [], - "assigned_files": [], - "can_expand": false + "referenced_source_code": [] } ], "components_relations": [ diff --git a/.codeboarding/Logic_Response_Adapters.json b/.codeboarding/Logic_Response_Adapters.json index a2c39ea52..270eacd93 100644 --- a/.codeboarding/Logic_Response_Adapters.json +++ b/.codeboarding/Logic_Response_Adapters.json @@ -17,17 +17,7 @@ "reference_start_line": 10, "reference_end_line": 34 } - ], - "assigned_files": [ - "chatterbot/search.py", - "chatterbot/logic/unit_conversion.py", - "chatterbot/logic/mathematical_evaluation.py", - "chatterbot/logic/logic_adapter.py", - "chatterbot/logic/best_match.py", - "chatterbot/logic/specific_response.py", - "chatterbot/logic/time_adapter.py" - ], - "can_expand": true + ] }, { "name": "Response Selection", @@ -39,11 +29,7 @@ "reference_start_line": null, "reference_end_line": null } - ], - "assigned_files": [ - "chatterbot/response_selection.py" - ], - "can_expand": true + ] }, { "name": "Comparisons", @@ -73,21 +59,12 @@ "reference_start_line": 122, "reference_end_line": 182 } - ], - "assigned_files": [ - "chatterbot/comparisons.py" - ], - "can_expand": true + ] }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", - "referenced_source_code": [], - "assigned_files": [ - "chatterbot/vectorstores.py", - "chatterbot/filters.py" - ], - "can_expand": false + "referenced_source_code": [] } ], "components_relations": [ diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index adebaedca..f0b7e450a 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,6 +13,9 @@ } ], "assigned_files": [ + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/learning_feedback_example.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -43,10 +46,15 @@ } ], "assigned_files": [ + "examples/specific_response_example.py", + "examples/math_and_time.py", + "examples/convert_units.py", + "examples/default_response_example.py", "chatterbot/search.py", + "chatterbot/adapters.py", "chatterbot/response_selection.py", + "chatterbot/tagging.py", "chatterbot/vectorstores.py", - "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/mathematical_evaluation.py", @@ -81,11 +89,22 @@ } ], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", + "examples/terminal_mongo_example.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/training_example_ubuntu_corpus.py", + "examples/export_example.py", + "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", "chatterbot/trainers.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -132,9 +151,10 @@ } ], "assigned_files": [ - "chatterbot/tagging.py", "chatterbot/parsing.py", - "chatterbot/preprocessors.py" + "chatterbot/preprocessors.py", + "chatterbot/filters.py", + "chatterbot/languages.py" ], "can_expand": true }, @@ -150,6 +170,8 @@ } ], "assigned_files": [ + "examples/openai_example.py", + "examples/ollama_example.py", "chatterbot/llm.py" ], "can_expand": true @@ -159,24 +181,8 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/terminal_mongo_example.py", - "examples/specific_response_example.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/math_and_time.py", - "examples/openai_example.py", - "examples/training_example_ubuntu_corpus.py", - "examples/convert_units.py", - "examples/ollama_example.py", - "examples/export_example.py", - "examples/default_response_example.py", "examples/tkinter_gui.py", - "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", @@ -186,24 +192,18 @@ "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", - "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", "chatterbot/__init__.py", - "chatterbot/adapters.py", "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", - "chatterbot/languages.py", "chatterbot/ext/__init__.py", "chatterbot/ext/django_chatterbot/__init__.py", "chatterbot/ext/django_chatterbot/apps.py", "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/storage/__init__.py", "chatterbot/logic/__init__.py" @@ -224,6 +224,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 8f2757357..ce5608f8a 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "8d77b37185f9f9ea313a90949b26d49389cab8b8", + "commit_hash": "0d4224bec87befda44520e946a8a7244d3897801", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 4fef2ac87..992e785bf 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -13,6 +13,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -128,3 +129,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 4fef2ac87..992e785bf 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -13,6 +13,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -128,3 +129,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From d093a117750de679b4480b1a8cb001d8bc06bb62 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 22 Nov 2025 20:23:25 +0000 Subject: [PATCH 08/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 63 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++ docs/architecture/overview.rst | 8 ++++ 4 files changed, 52 insertions(+), 29 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index f0b7e450a..05d55661d 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,9 +13,8 @@ } ], "assigned_files": [ - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/learning_feedback_example.py", + "chatterbot/__init__.py", + "chatterbot/__main__.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -46,17 +45,14 @@ } ], "assigned_files": [ - "examples/specific_response_example.py", - "examples/math_and_time.py", - "examples/convert_units.py", - "examples/default_response_example.py", "chatterbot/search.py", "chatterbot/adapters.py", "chatterbot/response_selection.py", "chatterbot/tagging.py", - "chatterbot/vectorstores.py", + "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", + "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", @@ -89,18 +85,14 @@ } ], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", - "examples/terminal_mongo_example.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/training_example_ubuntu_corpus.py", - "examples/export_example.py", - "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", + "chatterbot/vectorstores.py", "chatterbot/trainers.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", "chatterbot/ext/django_chatterbot/model_admin.py", "chatterbot/ext/django_chatterbot/admin.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", @@ -124,8 +116,10 @@ "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", + "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", @@ -153,7 +147,6 @@ "assigned_files": [ "chatterbot/parsing.py", "chatterbot/preprocessors.py", - "chatterbot/filters.py", "chatterbot/languages.py" ], "can_expand": true @@ -170,8 +163,6 @@ } ], "assigned_files": [ - "examples/openai_example.py", - "examples/ollama_example.py", "chatterbot/llm.py" ], "can_expand": true @@ -181,8 +172,24 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/terminal_mongo_example.py", + "examples/specific_response_example.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/math_and_time.py", + "examples/openai_example.py", + "examples/training_example_ubuntu_corpus.py", + "examples/convert_units.py", + "examples/ollama_example.py", + "examples/export_example.py", + "examples/default_response_example.py", "examples/tkinter_gui.py", + "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", @@ -192,21 +199,14 @@ "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", + "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", - "chatterbot/__init__.py", - "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", - "chatterbot/ext/__init__.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/storage/__init__.py", - "chatterbot/logic/__init__.py" + "chatterbot/ext/__init__.py" ], "can_expand": false }, @@ -231,6 +231,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index ce5608f8a..3654b05d7 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "0d4224bec87befda44520e946a8a7244d3897801", + "commit_hash": "8312afcbb7a5e9fc2fd4670efa9f6cb092b14ef3", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 992e785bf..495c24398 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -14,6 +14,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -136,3 +137,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 992e785bf..495c24398 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -14,6 +14,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -136,3 +137,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From f0b5efed524714332709c11fabdcc24e87ccf090 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 29 Nov 2025 20:23:49 +0000 Subject: [PATCH 09/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 75 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 +++ docs/architecture/overview.rst | 8 +++ 4 files changed, 58 insertions(+), 35 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 05d55661d..a9b41f3e5 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -14,7 +14,7 @@ ], "assigned_files": [ "chatterbot/__init__.py", - "chatterbot/__main__.py", + "chatterbot/adapters.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -46,9 +46,7 @@ ], "assigned_files": [ "chatterbot/search.py", - "chatterbot/adapters.py", "chatterbot/response_selection.py", - "chatterbot/tagging.py", "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", @@ -88,36 +86,6 @@ "chatterbot/corpus.py", "chatterbot/vectorstores.py", "chatterbot/trainers.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/models.py", - "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", @@ -145,6 +113,7 @@ } ], "assigned_files": [ + "chatterbot/tagging.py", "chatterbot/parsing.py", "chatterbot/preprocessors.py", "chatterbot/languages.py" @@ -203,10 +172,41 @@ "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", + "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", - "chatterbot/ext/__init__.py" + "chatterbot/ext/__init__.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/ext/sqlalchemy_app/models.py" ], "can_expand": false }, @@ -238,6 +238,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 3654b05d7..800bed64f 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "8312afcbb7a5e9fc2fd4670efa9f6cb092b14ef3", + "commit_hash": "d093a117750de679b4480b1a8cb001d8bc06bb62", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 495c24398..612624853 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -15,6 +15,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -144,3 +145,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 495c24398..612624853 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -15,6 +15,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -144,3 +145,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 9a1f81bea435c0b84fb8639c22a51af95457f526 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 6 Dec 2025 20:24:04 +0000 Subject: [PATCH 10/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 77 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 +++ docs/architecture/overview.rst | 8 +++ 4 files changed, 59 insertions(+), 36 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index a9b41f3e5..b670910f8 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,8 +13,6 @@ } ], "assigned_files": [ - "chatterbot/__init__.py", - "chatterbot/adapters.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -47,10 +45,8 @@ "assigned_files": [ "chatterbot/search.py", "chatterbot/response_selection.py", - "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", - "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", @@ -86,8 +82,37 @@ "chatterbot/corpus.py", "chatterbot/vectorstores.py", "chatterbot/trainers.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", - "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", @@ -116,6 +141,7 @@ "chatterbot/tagging.py", "chatterbot/parsing.py", "chatterbot/preprocessors.py", + "chatterbot/filters.py", "chatterbot/languages.py" ], "can_expand": true @@ -172,41 +198,15 @@ "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", + "chatterbot/__init__.py", + "chatterbot/adapters.py", "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", "chatterbot/ext/__init__.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/models.py", - "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/ext/sqlalchemy_app/models.py" + "chatterbot/storage/__init__.py", + "chatterbot/logic/__init__.py" ], "can_expand": false }, @@ -245,6 +245,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 800bed64f..522857a15 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "d093a117750de679b4480b1a8cb001d8bc06bb62", + "commit_hash": "f0b5efed524714332709c11fabdcc24e87ccf090", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 612624853..8fda8336f 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -16,6 +16,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -152,3 +153,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 612624853..8fda8336f 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -16,6 +16,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -152,3 +153,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From bc452866a4fde16feb9b4e6141f9ae2596f30afa Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 13 Dec 2025 20:24:12 +0000 Subject: [PATCH 11/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 59 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++ docs/architecture/overview.rst | 8 ++++ 4 files changed, 50 insertions(+), 27 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index b670910f8..c7dca0003 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,6 +13,11 @@ } ], "assigned_files": [ + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/terminal_mongo_example.py", + "examples/learning_feedback_example.py", + "examples/django_example/django_example/views.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -43,8 +48,13 @@ } ], "assigned_files": [ + "examples/specific_response_example.py", + "examples/math_and_time.py", + "examples/convert_units.py", + "examples/default_response_example.py", "chatterbot/search.py", "chatterbot/response_selection.py", + "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/mathematical_evaluation.py", @@ -79,18 +89,19 @@ } ], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/training_example_ubuntu_corpus.py", + "examples/export_example.py", + "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", "chatterbot/vectorstores.py", "chatterbot/trainers.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -110,7 +121,6 @@ "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", "chatterbot/storage/mongodb.py", @@ -141,7 +151,6 @@ "chatterbot/tagging.py", "chatterbot/parsing.py", "chatterbot/preprocessors.py", - "chatterbot/filters.py", "chatterbot/languages.py" ], "can_expand": true @@ -158,6 +167,8 @@ } ], "assigned_files": [ + "examples/openai_example.py", + "examples/ollama_example.py", "chatterbot/llm.py" ], "can_expand": true @@ -167,34 +178,16 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/terminal_mongo_example.py", - "examples/specific_response_example.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/math_and_time.py", - "examples/openai_example.py", - "examples/training_example_ubuntu_corpus.py", - "examples/convert_units.py", - "examples/ollama_example.py", - "examples/export_example.py", - "examples/default_response_example.py", "examples/tkinter_gui.py", - "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", "examples/django_example/django_example/settings.py", - "examples/django_example/django_example/views.py", "examples/django_example/django_example/wsgi.py", "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", - "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", @@ -205,6 +198,13 @@ "chatterbot/utils.py", "chatterbot/exceptions.py", "chatterbot/ext/__init__.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", "chatterbot/storage/__init__.py", "chatterbot/logic/__init__.py" ], @@ -252,6 +252,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 522857a15..5c1cbfced 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "f0b5efed524714332709c11fabdcc24e87ccf090", + "commit_hash": "9a1f81bea435c0b84fb8639c22a51af95457f526", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 8fda8336f..ba795cb02 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -17,6 +17,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -160,3 +161,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 8fda8336f..ba795cb02 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -17,6 +17,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -160,3 +161,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From ef4857578b1ae3908c5162c7a619a4fd6923550e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 20 Dec 2025 20:24:07 +0000 Subject: [PATCH 12/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 57 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++ docs/architecture/overview.rst | 8 ++++ 4 files changed, 49 insertions(+), 26 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index c7dca0003..b24b4bcdd 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,13 +13,7 @@ } ], "assigned_files": [ - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/terminal_mongo_example.py", - "examples/learning_feedback_example.py", - "examples/django_example/django_example/views.py", "chatterbot/conversation.py", - "chatterbot/components.py", "chatterbot/chatterbot.py" ], "can_expand": true @@ -48,15 +42,13 @@ } ], "assigned_files": [ - "examples/specific_response_example.py", - "examples/math_and_time.py", - "examples/convert_units.py", - "examples/default_response_example.py", "chatterbot/search.py", + "chatterbot/adapters.py", "chatterbot/response_selection.py", "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", + "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", @@ -89,19 +81,12 @@ } ], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/training_example_ubuntu_corpus.py", - "examples/export_example.py", - "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", - "chatterbot/vectorstores.py", "chatterbot/trainers.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -123,6 +108,7 @@ "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", + "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", @@ -167,8 +153,7 @@ } ], "assigned_files": [ - "examples/openai_example.py", - "examples/ollama_example.py", + "chatterbot/vectorstores.py", "chatterbot/llm.py" ], "can_expand": true @@ -178,24 +163,42 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", + "examples/basic_example.py", + "examples/terminal_example.py", + "examples/terminal_mongo_example.py", + "examples/specific_response_example.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/math_and_time.py", + "examples/openai_example.py", + "examples/training_example_ubuntu_corpus.py", + "examples/convert_units.py", + "examples/ollama_example.py", + "examples/export_example.py", + "examples/default_response_example.py", "examples/tkinter_gui.py", + "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", "examples/django_example/django_example/settings.py", + "examples/django_example/django_example/views.py", "examples/django_example/django_example/wsgi.py", "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", + "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", "chatterbot/__init__.py", - "chatterbot/adapters.py", "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", + "chatterbot/components.py", "chatterbot/exceptions.py", "chatterbot/ext/__init__.py", "chatterbot/ext/django_chatterbot/__init__.py", @@ -203,10 +206,7 @@ "chatterbot/ext/django_chatterbot/settings.py", "chatterbot/ext/django_chatterbot/model_admin.py", "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/storage/__init__.py", - "chatterbot/logic/__init__.py" + "chatterbot/ext/sqlalchemy_app/__init__.py" ], "can_expand": false }, @@ -259,6 +259,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 5c1cbfced..661293f2f 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "9a1f81bea435c0b84fb8639c22a51af95457f526", + "commit_hash": "bc452866a4fde16feb9b4e6141f9ae2596f30afa", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index ba795cb02..a0131e1a9 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -18,6 +18,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -168,3 +169,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index ba795cb02..a0131e1a9 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -18,6 +18,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -168,3 +169,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 03fb50e204d15d4c061a0bbfa07183cae8d87091 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 27 Dec 2025 20:25:19 +0000 Subject: [PATCH 13/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 11 +++++++++-- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++++++ docs/architecture/overview.rst | 8 ++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index b24b4bcdd..add5ecc28 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -43,8 +43,8 @@ ], "assigned_files": [ "chatterbot/search.py", - "chatterbot/adapters.py", "chatterbot/response_selection.py", + "chatterbot/vectorstores.py", "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", @@ -153,7 +153,6 @@ } ], "assigned_files": [ - "chatterbot/vectorstores.py", "chatterbot/llm.py" ], "can_expand": true @@ -195,6 +194,7 @@ "docs/_ext/github.py", "docs/_ext/canonical.py", "chatterbot/__init__.py", + "chatterbot/adapters.py", "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", @@ -266,6 +266,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 661293f2f..087f31bbf 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "bc452866a4fde16feb9b4e6141f9ae2596f30afa", + "commit_hash": "ef4857578b1ae3908c5162c7a619a4fd6923550e", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index a0131e1a9..4eccf7c8e 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -19,6 +19,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -176,3 +177,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index a0131e1a9..4eccf7c8e 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -19,6 +19,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -176,3 +177,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 7a3d6201a3632c825c6bf3a7cf9eb6c9472d829a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 3 Jan 2026 20:25:23 +0000 Subject: [PATCH 14/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 25 ++++++++++++++++--------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++++++++ docs/architecture/overview.rst | 8 ++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index add5ecc28..1f225713c 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -44,11 +44,9 @@ "assigned_files": [ "chatterbot/search.py", "chatterbot/response_selection.py", - "chatterbot/vectorstores.py", "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", - "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", @@ -81,12 +79,16 @@ } ], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", + "examples/training_example_list_data.py", + "examples/training_example_ubuntu_corpus.py", + "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", + "chatterbot/vectorstores.py", "chatterbot/trainers.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -108,7 +110,6 @@ "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", - "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", @@ -162,7 +163,6 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", "examples/basic_example.py", "examples/terminal_example.py", @@ -170,10 +170,8 @@ "examples/specific_response_example.py", "examples/tagged_dataset_example.py", "examples/memory_sql_example.py", - "examples/training_example_list_data.py", "examples/math_and_time.py", "examples/openai_example.py", - "examples/training_example_ubuntu_corpus.py", "examples/convert_units.py", "examples/ollama_example.py", "examples/export_example.py", @@ -189,7 +187,6 @@ "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", - "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", @@ -206,7 +203,10 @@ "chatterbot/ext/django_chatterbot/settings.py", "chatterbot/ext/django_chatterbot/model_admin.py", "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/sqlalchemy_app/__init__.py" + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/storage/__init__.py", + "chatterbot/logic/__init__.py" ], "can_expand": false }, @@ -273,6 +273,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 087f31bbf..f5739317c 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "ef4857578b1ae3908c5162c7a619a4fd6923550e", + "commit_hash": "03fb50e204d15d4c061a0bbfa07183cae8d87091", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 4eccf7c8e..bd96ae65a 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -20,6 +20,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -184,3 +185,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 4eccf7c8e..bd96ae65a 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -20,6 +20,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -184,3 +185,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 88813a8cb799b34bf686041a5d3a91ba95f861cd Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 10 Jan 2026 20:25:14 +0000 Subject: [PATCH 15/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 31 +++++++++++++++---------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 +++++++ docs/architecture/overview.rst | 8 +++++++ 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 1f225713c..815bfb5db 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,7 +13,10 @@ } ], "assigned_files": [ + "chatterbot/__init__.py", + "chatterbot/__main__.py", "chatterbot/conversation.py", + "chatterbot/components.py", "chatterbot/chatterbot.py" ], "can_expand": true @@ -43,10 +46,12 @@ ], "assigned_files": [ "chatterbot/search.py", + "chatterbot/adapters.py", "chatterbot/response_selection.py", "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", + "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", @@ -79,16 +84,13 @@ } ], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", - "examples/training_example_list_data.py", - "examples/training_example_ubuntu_corpus.py", - "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", "chatterbot/vectorstores.py", "chatterbot/trainers.py", "chatterbot/ext/django_chatterbot/models.py", "chatterbot/ext/django_chatterbot/abstract_models.py", "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", @@ -110,6 +112,7 @@ "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", "chatterbot/ext/sqlalchemy_app/models.py", "chatterbot/storage/storage_adapter.py", + "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", @@ -163,6 +166,7 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", "examples/basic_example.py", "examples/terminal_example.py", @@ -170,8 +174,10 @@ "examples/specific_response_example.py", "examples/tagged_dataset_example.py", "examples/memory_sql_example.py", + "examples/training_example_list_data.py", "examples/math_and_time.py", "examples/openai_example.py", + "examples/training_example_ubuntu_corpus.py", "examples/convert_units.py", "examples/ollama_example.py", "examples/export_example.py", @@ -187,15 +193,12 @@ "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", + "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", - "chatterbot/__init__.py", - "chatterbot/adapters.py", - "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", - "chatterbot/components.py", "chatterbot/exceptions.py", "chatterbot/ext/__init__.py", "chatterbot/ext/django_chatterbot/__init__.py", @@ -203,10 +206,7 @@ "chatterbot/ext/django_chatterbot/settings.py", "chatterbot/ext/django_chatterbot/model_admin.py", "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/storage/__init__.py", - "chatterbot/logic/__init__.py" + "chatterbot/ext/sqlalchemy_app/__init__.py" ], "can_expand": false }, @@ -280,6 +280,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index f5739317c..4d052b02a 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "03fb50e204d15d4c061a0bbfa07183cae8d87091", + "commit_hash": "7a3d6201a3632c825c6bf3a7cf9eb6c9472d829a", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index bd96ae65a..38c70eadd 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -21,6 +21,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -192,3 +193,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index bd96ae65a..38c70eadd 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -21,6 +21,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -192,3 +193,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From d18ea58e6863baa710652cf09ee258784c9dfa09 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 17 Jan 2026 20:25:35 +0000 Subject: [PATCH 16/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 115 +++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++ docs/architecture/overview.rst | 8 ++ 4 files changed, 78 insertions(+), 55 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 815bfb5db..781082165 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,10 +13,6 @@ } ], "assigned_files": [ - "chatterbot/__init__.py", - "chatterbot/__main__.py", - "chatterbot/conversation.py", - "chatterbot/components.py", "chatterbot/chatterbot.py" ], "can_expand": true @@ -45,18 +41,15 @@ } ], "assigned_files": [ - "chatterbot/search.py", - "chatterbot/adapters.py", - "chatterbot/response_selection.py", - "chatterbot/filters.py", - "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", - "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", "chatterbot/logic/specific_response.py", - "chatterbot/logic/time_adapter.py" + "chatterbot/logic/time_adapter.py", + "chatterbot/comparisons.py", + "chatterbot/response_selection.py", + "chatterbot/logic/logic_adapter.py" ], "can_expand": true }, @@ -84,39 +77,14 @@ } ], "assigned_files": [ - "chatterbot/corpus.py", - "chatterbot/vectorstores.py", - "chatterbot/trainers.py", - "chatterbot/ext/django_chatterbot/models.py", - "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/models.py", - "chatterbot/storage/storage_adapter.py", "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", - "chatterbot/storage/django_storage.py" + "chatterbot/storage/django_storage.py", + "chatterbot/corpus.py", + "chatterbot/trainers.py", + "chatterbot/storage/storage_adapter.py" ], "can_expand": true }, @@ -138,10 +106,8 @@ } ], "assigned_files": [ - "chatterbot/tagging.py", - "chatterbot/parsing.py", "chatterbot/preprocessors.py", - "chatterbot/languages.py" + "chatterbot/parsing.py" ], "can_expand": true }, @@ -166,6 +132,50 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ + "chatterbot/adapters.py", + "chatterbot/search.py", + "chatterbot/__init__.py", + "chatterbot/__main__.py", + "chatterbot/constants.py", + "chatterbot/tagging.py", + "chatterbot/conversation.py", + "chatterbot/vectorstores.py", + "chatterbot/utils.py", + "chatterbot/components.py", + "chatterbot/filters.py", + "chatterbot/exceptions.py", + "chatterbot/languages.py", + "chatterbot/ext/__init__.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/ext/sqlalchemy_app/models.py", "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", "examples/basic_example.py", @@ -196,17 +206,7 @@ "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", - "docs/_ext/canonical.py", - "chatterbot/constants.py", - "chatterbot/utils.py", - "chatterbot/exceptions.py", - "chatterbot/ext/__init__.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/sqlalchemy_app/__init__.py" + "docs/_ext/canonical.py" ], "can_expand": false }, @@ -287,6 +287,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 4d052b02a..00f151198 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "7a3d6201a3632c825c6bf3a7cf9eb6c9472d829a", + "commit_hash": "88813a8cb799b34bf686041a5d3a91ba95f861cd", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 38c70eadd..254f40f4d 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -22,6 +22,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -200,3 +201,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 38c70eadd..254f40f4d 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -22,6 +22,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -200,3 +201,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From 5e800ebef9d186ef1b0a36f2f43fd6d638e8bb72 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 24 Jan 2026 20:25:41 +0000 Subject: [PATCH 17/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 115 +++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 ++ docs/architecture/overview.rst | 8 ++ 4 files changed, 78 insertions(+), 55 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 781082165..0e45998f4 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,6 +13,10 @@ } ], "assigned_files": [ + "chatterbot/__init__.py", + "chatterbot/__main__.py", + "chatterbot/conversation.py", + "chatterbot/components.py", "chatterbot/chatterbot.py" ], "can_expand": true @@ -41,15 +45,17 @@ } ], "assigned_files": [ + "chatterbot/search.py", + "chatterbot/response_selection.py", + "chatterbot/filters.py", + "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/__init__.py", "chatterbot/logic/mathematical_evaluation.py", + "chatterbot/logic/logic_adapter.py", "chatterbot/logic/best_match.py", "chatterbot/logic/specific_response.py", - "chatterbot/logic/time_adapter.py", - "chatterbot/comparisons.py", - "chatterbot/response_selection.py", - "chatterbot/logic/logic_adapter.py" + "chatterbot/logic/time_adapter.py" ], "can_expand": true }, @@ -77,14 +83,45 @@ } ], "assigned_files": [ + "chatterbot/corpus.py", + "chatterbot/vectorstores.py", + "chatterbot/trainers.py", + "chatterbot/ext/django_chatterbot/__init__.py", + "chatterbot/ext/django_chatterbot/apps.py", + "chatterbot/ext/django_chatterbot/models.py", + "chatterbot/ext/django_chatterbot/abstract_models.py", + "chatterbot/ext/django_chatterbot/settings.py", + "chatterbot/ext/django_chatterbot/model_admin.py", + "chatterbot/ext/django_chatterbot/admin.py", + "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/__init__.py", + "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", + "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", + "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", + "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", + "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", + "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", + "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", + "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", + "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", + "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", + "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", + "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", + "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", + "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", + "chatterbot/ext/sqlalchemy_app/__init__.py", + "chatterbot/ext/sqlalchemy_app/models.py", + "chatterbot/storage/storage_adapter.py", "chatterbot/storage/__init__.py", "chatterbot/storage/mongodb.py", "chatterbot/storage/redis.py", "chatterbot/storage/sql_storage.py", - "chatterbot/storage/django_storage.py", - "chatterbot/corpus.py", - "chatterbot/trainers.py", - "chatterbot/storage/storage_adapter.py" + "chatterbot/storage/django_storage.py" ], "can_expand": true }, @@ -106,8 +143,10 @@ } ], "assigned_files": [ + "chatterbot/tagging.py", + "chatterbot/parsing.py", "chatterbot/preprocessors.py", - "chatterbot/parsing.py" + "chatterbot/languages.py" ], "can_expand": true }, @@ -132,50 +171,6 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ - "chatterbot/adapters.py", - "chatterbot/search.py", - "chatterbot/__init__.py", - "chatterbot/__main__.py", - "chatterbot/constants.py", - "chatterbot/tagging.py", - "chatterbot/conversation.py", - "chatterbot/vectorstores.py", - "chatterbot/utils.py", - "chatterbot/components.py", - "chatterbot/filters.py", - "chatterbot/exceptions.py", - "chatterbot/languages.py", - "chatterbot/ext/__init__.py", - "chatterbot/ext/django_chatterbot/__init__.py", - "chatterbot/ext/django_chatterbot/apps.py", - "chatterbot/ext/django_chatterbot/models.py", - "chatterbot/ext/django_chatterbot/abstract_models.py", - "chatterbot/ext/django_chatterbot/settings.py", - "chatterbot/ext/django_chatterbot/model_admin.py", - "chatterbot/ext/django_chatterbot/admin.py", - "chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/__init__.py", - "chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py", - "chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py", - "chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py", - "chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py", - "chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py", - "chatterbot/ext/django_chatterbot/migrations/0001_initial.py", - "chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py", - "chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py", - "chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0009_tags.py", - "chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py", - "chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py", - "chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py", - "chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py", - "chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py", - "chatterbot/ext/sqlalchemy_app/__init__.py", - "chatterbot/ext/sqlalchemy_app/models.py", "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", "examples/basic_example.py", @@ -206,7 +201,12 @@ "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", - "docs/_ext/canonical.py" + "docs/_ext/canonical.py", + "chatterbot/adapters.py", + "chatterbot/constants.py", + "chatterbot/utils.py", + "chatterbot/exceptions.py", + "chatterbot/ext/__init__.py" ], "can_expand": false }, @@ -294,6 +294,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index 00f151198..dd0bbe905 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "88813a8cb799b34bf686041a5d3a91ba95f861cd", + "commit_hash": "d18ea58e6863baa710652cf09ee258784c9dfa09", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 254f40f4d..0025f20f0 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -23,6 +23,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -208,3 +209,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 254f40f4d..0025f20f0 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -23,6 +23,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -208,3 +209,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* From d3f891e9063c641fbdacd9cbc38e1e7307017186 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 31 Jan 2026 20:29:22 +0000 Subject: [PATCH 18/18] docs: update codeboarding architecture documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 6 - JSON files created/updated: 7 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/ChatterBot - Destination: docs/architecture/ 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow. --- .codeboarding/analysis.json | 47 ++++++++++++++----------- .codeboarding/codeboarding_version.json | 2 +- .codeboarding/overview.rst | 8 +++++ docs/architecture/overview.rst | 8 +++++ 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/.codeboarding/analysis.json b/.codeboarding/analysis.json index 0e45998f4..8b71e670e 100644 --- a/.codeboarding/analysis.json +++ b/.codeboarding/analysis.json @@ -13,8 +13,8 @@ } ], "assigned_files": [ - "chatterbot/__init__.py", - "chatterbot/__main__.py", + "examples/basic_example.py", + "examples/terminal_example.py", "chatterbot/conversation.py", "chatterbot/components.py", "chatterbot/chatterbot.py" @@ -45,9 +45,12 @@ } ], "assigned_files": [ + "examples/specific_response_example.py", + "examples/math_and_time.py", + "examples/convert_units.py", + "examples/default_response_example.py", "chatterbot/search.py", "chatterbot/response_selection.py", - "chatterbot/filters.py", "chatterbot/comparisons.py", "chatterbot/logic/unit_conversion.py", "chatterbot/logic/__init__.py", @@ -83,6 +86,15 @@ } ], "assigned_files": [ + "examples/training_example_chatterbot_corpus.py", + "examples/terminal_mongo_example.py", + "examples/tagged_dataset_example.py", + "examples/memory_sql_example.py", + "examples/training_example_list_data.py", + "examples/training_example_ubuntu_corpus.py", + "examples/export_example.py", + "examples/learning_feedback_example.py", + "examples/django_example/django_example/management/commands/train.py", "chatterbot/corpus.py", "chatterbot/vectorstores.py", "chatterbot/trainers.py", @@ -146,6 +158,7 @@ "chatterbot/tagging.py", "chatterbot/parsing.py", "chatterbot/preprocessors.py", + "chatterbot/filters.py", "chatterbot/languages.py" ], "can_expand": true @@ -162,6 +175,8 @@ } ], "assigned_files": [ + "examples/openai_example.py", + "examples/ollama_example.py", "chatterbot/llm.py" ], "can_expand": true @@ -171,24 +186,8 @@ "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", "referenced_source_code": [], "assigned_files": [ - "examples/training_example_chatterbot_corpus.py", "examples/__init__.py", - "examples/basic_example.py", - "examples/terminal_example.py", - "examples/terminal_mongo_example.py", - "examples/specific_response_example.py", - "examples/tagged_dataset_example.py", - "examples/memory_sql_example.py", - "examples/training_example_list_data.py", - "examples/math_and_time.py", - "examples/openai_example.py", - "examples/training_example_ubuntu_corpus.py", - "examples/convert_units.py", - "examples/ollama_example.py", - "examples/export_example.py", - "examples/default_response_example.py", "examples/tkinter_gui.py", - "examples/learning_feedback_example.py", "examples/django_example/manage.py", "examples/django_example/django_example/asgi.py", "examples/django_example/django_example/__init__.py", @@ -198,11 +197,12 @@ "examples/django_example/django_example/urls.py", "examples/django_example/django_example/management/__init__.py", "examples/django_example/django_example/management/commands/__init__.py", - "examples/django_example/django_example/management/commands/train.py", "docs/conf.py", "docs/_ext/github.py", "docs/_ext/canonical.py", + "chatterbot/__init__.py", "chatterbot/adapters.py", + "chatterbot/__main__.py", "chatterbot/constants.py", "chatterbot/utils.py", "chatterbot/exceptions.py", @@ -301,6 +301,13 @@ "assigned_files": [], "can_expand": false }, + { + "name": "Unclassified", + "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", + "referenced_source_code": [], + "assigned_files": [], + "can_expand": false + }, { "name": "Unclassified", "description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)", diff --git a/.codeboarding/codeboarding_version.json b/.codeboarding/codeboarding_version.json index dd0bbe905..74ec0a22a 100644 --- a/.codeboarding/codeboarding_version.json +++ b/.codeboarding/codeboarding_version.json @@ -1,4 +1,4 @@ { - "commit_hash": "d18ea58e6863baa710652cf09ee258784c9dfa09", + "commit_hash": "5e800ebef9d186ef1b0a36f2f43fd6d638e8bb72", "code_boarding_version": "0.2.0" } diff --git a/.codeboarding/overview.rst b/.codeboarding/overview.rst index 0025f20f0..a1fc112af 100644 --- a/.codeboarding/overview.rst +++ b/.codeboarding/overview.rst @@ -24,6 +24,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -216,3 +217,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None* diff --git a/docs/architecture/overview.rst b/docs/architecture/overview.rst index 0025f20f0..a1fc112af 100644 --- a/docs/architecture/overview.rst +++ b/docs/architecture/overview.rst @@ -24,6 +24,7 @@ Overview Unclassified["Unclassified"] Unclassified["Unclassified"] Unclassified["Unclassified"] + Unclassified["Unclassified"] Chatbot_Core_Engine -- "Receives Processed Input From" --> Input_Output_Processors Chatbot_Core_Engine -- "Delegates Response Generation To" --> Logic_Response_Adapters Logic_Response_Adapters -- "Queries Knowledge Base From" --> Data_Storage_Training @@ -216,3 +217,10 @@ Unclassified Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) **Related Classes/Methods**: *None* + +Unclassified +^^^^^^^^^^^^ + +Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies) + +**Related Classes/Methods**: *None*