A collection of services to interact with various language models, including Groq, Gemini, and OpenAI. Each service maintains a list of models and provides methods to analyze prompts and return responses.
groq_model.py
: Interacts with Groq models.gemini_model.py
: Interacts with Gemini models.openai_model.py
: Interacts with OpenAI models.exceptions.py
: Custom exceptions used across the services.
This project uses Poetry for dependency management. Follow the instructions below to set up the project.
- Python 3.7 or higher
- Poetry
-
Clone the repository:
git clone https://github.com/your-username/model-zoo.git cd model-zoo
-
Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
Or follow the instructions from the Poetry documentation.
-
Install dependencies:
poetry install
-
Activate the virtual environment:
poetry shell
Here's an example of how to use the GroqModel
class to analyze a prompt:
from groq_model import GroqModel
service = GroqModel(model_name="llama3-8b")
response = service.run(prompt="Analyze this case for me.")
print(response)