=================================
Quackamollie Ollama Model Manager
:Name: Quackamollie Ollama Model Manager
:Package name: quackamollie-ollama-model-manager
:Description: Model manager compatible with Ollama models through Ollama API for Quackamollie Telegram chat bot
:Version: 0.1
:Main page: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager
:PyPI package: https://pypi.org/project/quackamollie-ollama-model-manager/
:Docker Image: registry.gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager:0.1
:Documentation: https://ollama-model-manager-forge-of-absurd-ducks-quack-4019535ed9bff7.gitlab.io/
:Build Status:
:Master: |master_pipeline_badge| |master_coverage_badge|
:Dev: |dev_pipeline_badge| |dev_coverage_badge|
.. |master_pipeline_badge| image:: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/badges/master/pipeline.svg
:target: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/commits/master
:alt: Master pipeline status
.. |master_coverage_badge| image:: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/badges/master/coverage.svg
:target: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/commits/master
:alt: Master coverage status
.. |dev_pipeline_badge| image:: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/badges/dev/pipeline.svg
:target: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/commits/dev
:alt: Dev pipeline status
.. |dev_coverage_badge| image:: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/badges/dev/coverage.svg
:target: https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/commits/dev
:alt: Dev coverage status
Project description
Quackamollie <https://gitlab.com/forge_of_absurd_ducks/quackamollie/quackamollie>
_ is a Telegram <https://telegram.org/>
_ chat bot
developed in Python <https://www.python.org/>
_ using the library aiogram <https://docs.aiogram.dev/en/latest/>
_ to serve LLM models
running locally using Ollama <https://ollama.com/>
_.
This package is a model manager exposing Ollama <https://ollama.com/>
_ models for the Quackamollie <https://gitlab.com/forge_of_absurd_ducks/quackamollie/quackamollie>
_ project.
It contains:
- a model manager
OllamaQuackamollieModelManager
class implementing abstract functions of MetaQuackamollieModelManager
Learn more about Quackamollie on the project main page <https://gitlab.com/forge_of_absurd_ducks/quackamollie/quackamollie>
_.
Requirements
Virtual environment
- Setup a virtual environment in python 3.10
.. code-block:: bash
make venv
or
python3 -m venv venv
.. code-block:: bash
source venv/bin/activate
- If you want to deactivate the environment
.. code-block:: bash
deactivate
Tests
Tests requirements
- Install test requirements
.. code-block:: bash
make devtools
or
pip install tox
Run pytest
.. code-block:: bash
tox
Run lint
.. code-block:: bash
tox -e lint
Documentation
- To auto-generate the documentation configuration
.. code-block:: bash
tox -e gendocs
- To generate the documentation in Html
.. code-block:: bash
tox -e docs
Install
- Install the application from sources
.. code-block:: bash
make install
or
pip install .
- Or install it from distribution
.. code-block:: bash
pip install dist/quackamollie-ollama-model-manager-0.1.tar.gz
.. code-block:: bash
pip install dist/quackamollie-ollama-model-manager-0.1.whl
- Or install it from PyPi repository
.. code-block:: bash
pip install quackamollie-ollama-model-manager # latest
or
pip install "quackamollie-ollama-model-manager==0.1"
Docker
- To build the application docker
.. code-block:: bash
docker build --network=host -t quackamollie_ollama_model_manager:0.1 .
-
The official Docker image of this project is available at: registry.gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager
-
You can pull the image of the current release:
.. code-block:: bash
docker pull registry.gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager:latest # or dev
or
docker pull registry.gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager:0.1
Running the model manager
quackamollie-ollama-model-manager
package is automatically discovered, through entrypoints, by the command tool line named quackamollie
.
Therefore, once installed, you should automatically see models managed by this model manager in Telegram /settings
command.
You can install models for this model manager by simply pulling them using the ollama <https://ollama.com/>
_ command:
.. code-block:: bash
ollama pull llama3
For details on how to run the Quackamollie project, please refer to the Quackamollie's project main page <https://gitlab.com/forge_of_absurd_ducks/quackamollie/quackamollie>
_.
Authors
- QuacktorAI - Initial work -
quacktorai <https://gitlab.com/quacktorai>
_
Contributing
If you want to report a bug or ask for a new feature of quackamollie-ollama-model-manager
, please open an issue
in the Gitlab ticket management section of this project <https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/-/issues>
_.
Please, first ensure that your issue is not redundant with already open issues.
If you want to contribute code to this project, please open first an issue and then a merge request with commit names referencing this issues.
Note that only fast-forward merge requests are accepted.
For more details on the general contributing mindset of this project, please refer to CONTRIBUTING.md <https://gitlab.com/forge_of_absurd_ducks/quackamollie/lib/model_managers/quackamollie_ollama_model_manager/-/blob/master/CONTRIBUTING.md>
_.
Credits
Section in writing, sorry for the inconvenience.