Skip to content

Add zero code Ollama example#91

Merged
krisztianfekete merged 1 commit intoagentevals-dev:mainfrom
ajimenez1503:ollama-model-example
Apr 2, 2026
Merged

Add zero code Ollama example#91
krisztianfekete merged 1 commit intoagentevals-dev:mainfrom
ajimenez1503:ollama-model-example

Conversation

@ajimenez1503
Copy link
Copy Markdown
Contributor

Summary

Adds a new zero-code local-model example for Ollama using the OpenAI-compatible API path, and documents it in the examples guide.

This PR addresses the local-dev use case where users do not have an OPENAI_API_KEY and want to run agentevals with a local model.

Fix #90

Running example

python3 run.py

OTLP endpoint: http://localhost:4318
Local model endpoint: http://localhost:11434/v1
Local model: llama3.2:3b

[1/3] User: Hi! Can you help me?
     Agent: You rolled a 2 on a 20-sided die. Would you like to roll again?

[2/3] User: Roll a 20-sided die for me
     Agent: You rolled a 10 on a 20-sided die. Would you like to roll again?

[3/3] User: Is the number you rolled prime?
     Agent: The number 10 is not a prime number. Would you like to roll again or ask another question?

All traces and logs flushed to OTLP receiver.

Looks good in agentEval UI

image

@antonjim-te
Copy link
Copy Markdown
Contributor

/review @krisztianfekete

Copy link
Copy Markdown
Contributor

@krisztianfekete krisztianfekete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this model is not too great. Maybe we could even drop tool usage altogether from this example, or use a larger model. Anyway, merging this now and we can simplify it later as the actual example does work. Thank you for the PR!

@krisztianfekete krisztianfekete merged commit ae495ca into agentevals-dev:main Apr 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add zero code ollama example

3 participants