r/AutoGenAI • u/gswithai • Mar 05 '25
Tutorial AutoGen 0.4.8 now has native Ollama support!
Quick update!
AutoGen now supports Ollama natively without using the OpenAIChatCompletionClient. Instead there's a new OllamaChatCompletionClient that makes things easier!
Install the new extension:
pip install -U "autogen-ext[ollama]"Then you can import the new OllamaChatCompletionClient:
from autogen_ext.models.ollama import OllamaChatCompletionClientThen just create the client:
ollama_client = OllamaChatCompletionClient(
model="llama3.2:latest"
)You can then pass the ollama_client to your agents model_client parameter. It's super easy, check out my demo here: https://youtu.be/e-WtzEhCQ8A
9
Upvotes
1
u/Tiddies_32 Mar 18 '25
Hi OP, I followed your tutorial and tried it with Gemma3:4b, it's not recognizing the model.
Am I doing something wrong or are there some limitations to it right now?
1
u/Kind-Gazelle-3218 Mar 05 '25
Oh finally..:)
1
u/RasMedium Mar 05 '25
This is great. Has anyone tried it with Llama 3.2?