Closed zavocc closed 1 month ago
Refactored tools, cogs and updated some docs TODO: testing and review
New features in this version so far:
CHAT_HISTORY_DB
is now MONGO_DB_URL
(connection string)show_stats
parameter in /ask
command to show the chat conversation turn counts and the models used (off by default)Tool
class and its properties instead of using separate tool/function registration and use _callable
syntax and mandatory convention to call functions.
chat_mgmt.py
and genai.py
to simply chat.py
(controls) which inherits from generative.py
(LLM generation) so the generative module is now responsible for database connection and LLM lifecycle. It is still a cog/discord command where it contains /ask
prompt_history
is now a counter for how many chat interactions was made instead of counting arrays arrays of prompt which is a privacy implication if one views the database to check chat length based on turns
Using MongoDB means faster feature updates, ease of maintenance, DOCUMENT/JSON based so its easier to work with it and use native types like dict instead of separate SQL queries and scalability
TODO:
Use of index? and various optimizations(STILL LEARNING THIS)NEEDS TO ADDRESS: