Installation Guide¶
The OpenHosta python package contains multiple features which you can install via PyPI or GitHub.
Some features will be available only if you install additional packages like pydantic for advanced objects or pillow for image processing. You'll also need to set up a local model or configure an API key to a remote model if you do not have the right to install a model locally.
All this will be detailed in this document.
Prerequisites¶
- Python 3.10 | 3.11 | 3.12 | 3.13
-
Download and install Python from python.org.
-
pip
pipis generally included with Python. Verify its installation with: > You can also useuvthat is a bit more modern: https://pypi.org/project/uv/
OpenHosta Installation¶
Install using pip:¶
- Install the package
- Verify installation
Install using GitHub¶
- Clone the Git repository:
- Verify installation
Installing OpenHosta with GitHub gives you access to all the source code, allowing you to take over the tool and perhaps contribute to the project, but the pip approach is simpler for classic OpenHosta use.
Additional Dependencies¶
You can use additional dependencies to unlock more features.
# This will enable the image processing features (PIL.Image)
pip install pillow # tested with version 11.0.0
tests¶
In order to run the tests, you need to clone the repository and install additional packages.
Cloning the repository:
Adds all the package used for executing the OpenHosta's tests.
API Key Setup¶
- Get API key from your favorite provider. As default model we use OpenAI
GPT-4.1, you can get a key from https://platform.openai.com/account/api-keys - Then all you have to do is set a environment variable containing this API key:
- Windows:
- MacOS/Linux:
We recommand to configure the default model in a .env file in your working directory or in any parent directory. OpenHosta will automatically load it if present.
Local Models¶
You can use local models with OpenHosta using Ollama.
-
Install Ollama by following the instructions on their official website.
-
Download and install a model using Ollama. For example, to install the
mistral-small3.2model, run:
- Set the model in your environment variables:
# Windows
setx OPENHOSTA_DEFAULT_MODEL_NAME "mistral-small3.2"
setx OPENHOSTA_DEFAULT_MODEL_BASE_URL "http://localhost:11434/v1"
setx OPENHOSTA_DEFAULT_MODEL_API_KEY "none"
or using a .env file in your working directory:
# Recommended way as it will be loaded automatically by OpenHosta and is compatible with all OS
OPENHOSTA_DEFAULT_MODEL_NAME="mistral-small3.2"
OPENHOSTA_DEFAULT_MODEL_BASE_URL="http://localhost:11434/v1"
OPENHOSTA_DEFAULT_MODEL_API_KEY="none"
Verify that everything is working by running a simple script:
from OpenHosta import ask
ask("Do you know what is your name as a model? If yes just answer with the name.")
# you should get 'Mistral Small 3.2' as an answer
Common Issues¶
If you encounter a problem, try these few method that may fix it:
- Update pip:
pip install --upgrade pip - Use virtual environment with
uvorvenv - Try
pip3instead ofpip - Use
sudo(Unix) or run as administrator (Windows) if permission errors occur
For more help and if the problem persist, please file an issue on GitHub.
Where to go next?¶
it is time for you to check OpenHosta's documentation for more detailled informations or exemples.