quackamollie.core.quackamollie module¶
quackamollie¶
Command line interface for quackamollie.
- param ctx:
Click context to pass between commands of quackamollie
- type ctx:
click.Context
- param settings:
Quackamollie settings to pass between commands of quackamollie
- type settings:
QuackamollieSettings
- param verbose:
Verbosity level, default: 0
- type verbose:
int
- param config_file:
Configuration file, default: Unset
- type config_file:
click.Path(exists=True, dir_okay=False)
- param log_dir:
Directory where to export logs. By default, it is unset so logs are prompted in console.
- type log_dir:
click.Path(exists=True, file_okay=False)
quackamollie [OPTIONS] COMMAND [ARGS]...
Options
- -h, --help¶
Show this message and exit.
- --version¶
Show the version and exit.
- -v, --verbose¶
Enable verbose output
- -c, --config-file <config_file>¶
Configuration file path for the application
- -l, --log-dir <log_dir>¶
Dir path for logs
db¶
CLI group to handle database’s URL configuration and call associated database commands.
- param ctx:
Click context to pass between commands of quackamollie
- type ctx:
click.Context
- param settings:
Quackamollie settings to pass between commands of quackamollie
- type settings:
QuackamollieSettings
- param db_protocol:
Database protocol, must be a protocol supported by SQLAlchemy
- type db_protocol:
str
- param db_username:
Username for postgres database connection
- type db_username:
Optional[str]
- param db_password:
Password for postgres database connection
- type db_password:
Optional[str]
- param db_host:
Hostname of the postgres database
- type db_host:
str
- param db_port:
Port of the postgres database
- type db_port:
Optional[str]
- param db_name:
Name of the postgres database
- type db_name:
str
- param db_url:
Override of the URL of the postgres database, by default it is inferred from ‘–db-*’ options
- type db_url:
Optional[str]
quackamollie db [OPTIONS] COMMAND [ARGS]...
Options
- -h, --help¶
Show this message and exit.
- -dbpr, --db-protocol <db_protocol>¶
Database protocol, must be a protocol supported by SQLAlchemy
- Default:
'postgresql+asyncpg'
- -dbu, --db-username <db_username>¶
Username for postgres database connection
- -dbpa, --db-password <db_password>¶
Password for postgres database connection
- -dbh, --db-host <db_host>¶
Hostname of the postgres database
- Default:
'0.0.0.0'
- -dbpo, --db-port <db_port>¶
Port of the postgres database
- -dbn, --db-name <db_name>¶
Name of the postgres database
- Default:
'quackamollie'
- --db-url <db_url>¶
Override of the URL of the postgres database, by default it is inferred from ‘–db-*’ options
alembic¶
Alembic CLI wrapper to handle database’s URL configuration. Arguments are passed to alembic’s main CLI.
- param _:
Click context to pass between commands of quackamollie
- type _:
click.Context
- param __:
Quackamollie settings to pass between commands of quackamollie
- type __:
QuackamollieSettings
- param alembic_args:
A list of additional arguments to pass to the Alembic CLI main function
- type alembic_args:
List
quackamollie db alembic [OPTIONS] [ALEMBIC_ARGS]...
Arguments
- ALEMBIC_ARGS¶
Optional argument(s)
serve¶
CLI command to serve Quackamollie bot which polls and answers Telegram messages.
- param ctx:
Click context to pass between commands of quackamollie
- type ctx:
click.Context
- param settings:
Quackamollie settings to pass between commands of quackamollie
- type settings:
QuackamollieSettings
- param bot_token:
Telegram bot API token
- param bot_token:
str
- param admin_ids:
A list of admin user ids separated by commas
- param admin_ids:
List[int]
- param moderator_ids:
A list of moderator user ids separated by commas
- param moderator_ids:
List[int]
- param user_ids:
A list of user ids separated by commas
- param user_ids:
List[int]
- param data_dir:
Data directory dedicated to Quackamollie’s data
- param data_dir:
click.Path
- param ollama_base_url:
Ollama base url
- param ollama_base_url:
Optional[str]
- param default_model_manager:
Default model manager to use when starting a new chat. If None, user will be asked to choose one
- param default_model_manager:
Optional[str]
- param default_model:
Default model to use when starting a new chat. If None, the user will be asked to choose one
- param default_model:
Optional[str]
- param default_model_config:
Default model additional configuration given to the model when calling it
- param default_model_config:
Optional[str]
- param history_max_length:
Maximum length of the history to include when answering a message using a model
- param history_max_length:
Optional[int]
- param min_nb_chunk_to_show:
The minimum number of chunks to show at the same time when streaming the answer of a model
- param min_nb_chunk_to_show:
int
- param db_protocol:
Database protocol, must be a protocol supported by SQLAlchemy
- type db_protocol:
str
- param db_username:
Username for postgres database connection
- type db_username:
Optional[str]
- param db_password:
Password for postgres database connection
- type db_password:
Optional[str]
- param db_host:
Hostname of the postgres database
- type db_host:
str
- param db_port:
Port of the postgres database
- type db_port:
Optional[str]
- param db_name:
Name of the postgres database
- type db_name:
str
- param db_url:
Override of the URL of the postgres database, by default it is inferred from ‘–db-*’ options
- type db_url:
Optional[str]
quackamollie serve [OPTIONS]
Options
- -h, --help¶
Show this message and exit.
- -t, --bot-token <bot_token>¶
Required Telegram bot API token
- -a, --admin-ids <admin_ids>¶
A list of admin user ids separated by commas
- -m, --moderator-ids <moderator_ids>¶
A list of moderator user ids separated by commas
- -u, --user-ids <user_ids>¶
A list of user ids separated by commas
- -d, --data-dir <data_dir>¶
Data directory dedicated to Quackamollie’s data
- Default:
'data/quackamollie'
- -o, --ollama-base-url <ollama_base_url>¶
Ollama base url
- Default:
'http://localhost:11434'
- --default-model-manager <default_model_manager>¶
Default model manager to use when starting a new chat. If None, user will be asked to choose one
- --default-model <default_model>¶
Default model to use when starting a new chat. If None, the user will be asked to choose one
- --default-model-config <default_model_config>¶
Default model additional configuration given to the model when calling it
- --history-max-length <history_max_length>¶
Maximum length of the history to include when answering a message using a model
- Default:
20
- --min-nb-chunk-to-show <min_nb_chunk_to_show>¶
The minimum number of chunks to show at the same time when streaming the answer of a model
- Default:
10
- -dbpr, --db-protocol <db_protocol>¶
Database protocol, must be a protocol supported by SQLAlchemy
- Default:
'postgresql+asyncpg'
- -dbu, --db-username <db_username>¶
Username for postgres database connection
- -dbpa, --db-password <db_password>¶
Password for postgres database connection
- -dbh, --db-host <db_host>¶
Hostname of the postgres database
- Default:
'0.0.0.0'
- -dbpo, --db-port <db_port>¶
Port of the postgres database
- -dbn, --db-name <db_name>¶
Name of the postgres database
- Default:
'quackamollie'