Undocumented
Package | app |
No package docstring; 3/3 functions, 0/1 module, 0/1 package documented |
Package | classes |
No package docstring; 2/2 classes, 0/1 module documented |
Package | db |
Undocumented |
Module | settings |
Undocumented |
Package | state |
No package docstring; 1/1 class documented |
Package | web |
Undocumented |
Module | writedocs |
Undocumented |
From __init__.py
:
Function | compile |
Compiles all unique attribute found in the catalog in a single file with each tag on a new line and writes it to the database. |
Function | compile |
Compiles "catalog_entry" representations of all documents in one JSON file and writes it to the database. |
Function | init |
Initializes the application with the specified configurations. |
Function | query |
Queries the vector store and generates a response using the LLM. |
Variable | default |
Undocumented |
Compiles all unique attribute found in the catalog in a single file with each tag on a new line and writes it to the database. Raises: RegisterError: If there is an error during compilation or writing.
Compiles "catalog_entry" representations of all documents in one JSON file and writes it to the database. Raises: RuntimeError: If there is an error during compilation.
str | qaapdb.qaapDB
= 'data/qaap_db', ai: AIInterface | str
= 'qwen3:0.6b', embeddings_model: str
= 'Qwen3-Embedding-0.6B', object_of_search: str
= 'solutions', system_prompt: str
= default_system_prompt, api_server: int | dict
= 8080, allow_post: bool
= False, frontend: bool
= False, catalog: bool
= True, attributes: list[ str]
= None):
¶
Initializes the application with the specified configurations. This method sets up the database, AI interface, and other necessary components for the application. It also initializes the vector store and optionally starts the API server. Args: database (str | ottoDB.ottoDB, optional): The database to use. Can be a path to a flat file database (uses a FlatFileDB instance) or an instance of ottoDB. Defaults to "data/qaap_db". ai (AIInterface.AIInterface | str, optional): The AI interface to use. Can be a model name (uses an OllamaAIInterface) or an instance of AIInterface. Defaults to "qwen3:0.6b". embeddings_model (str, optional): The embeddings model to use via SentenceTransformer. Can be a local path or HuggingFace project name. Defaults to "Qwen3-Embedding-0.6B". object_of_search (str, optional): The object of search. Will be replaced in the system_prompt. Defaults to "solutions". system_prompt (str, optional): The system prompt to use. Defaults to qA_Ap.default_system_prompt. api_server (int | dict | False, optional): The port on wich to run the API server (bottle.py). If a dictionary is provided, it will be used as the server configuration. If False the server is not run. Defaults to 8080. auth (bool, optional): Whether to enable authentication on the API server POST endpoints. Defaults to False. frontend (bool, optional): Whether to run the integrated frontend interface. Defaults to False. Returns: None
str
, history: list[ dict[ str, str]]
= None, include_metadata: bool
= False) -> AIStreamResponse
:
¶
Queries the vector store and generates a response using the LLM. Args: query (str): The user's query. Returns: str: The generated response from the LLM. Raises: RuntimeError: If querying or LLM generation fails.