This directory contains tutorials and examples for using the Mandoline Python client.
quick_start.py: A basic introduction to using the Mandoline client.prompt_engineering.py: An example of using Mandoline for prompt engineering tasks.model_selection.py: A tutorial on comparing different language models using Mandoline.get_metrics.py: A simple demo that fetches all metrics with a "personality" tag.
-
Ensure you're in the tutorials directory:
cd tutorials -
Install the necessary dependencies:
pip install -r requirements.txt
-
Create a
.envfile in this directory with your API keys:export MANDOLINE_API_KEY=your_mandoline_api_key export OPENAI_API_KEY=your_openai_api_key export ANTHROPIC_API_KEY=your_anthropic_api_key
To run a specific tutorial, use the following commands:
-
Source the environment variables:
source .env -
Run the desired script:
python quick_start.py # or python prompt_engineering.py # or python model_selection.py # or python get_metrics.py
Feel free to modify these scripts to experiment with different prompts, metrics, or models. The tutorials are designed to be starting points for your own experiments with Mandoline.
- For more information on the Mandoline API, visit the official documentation.
- If you encounter any issues or have questions, please open an issue or contact Mandoline support at [email protected].