Skip to content

Instantly share code, notes, and snippets.

@georgejean
georgejean / gist:c19c6af1abfe8cdbf07481329d992360
Last active June 5, 2025 16:28
Ollama and openAI Agent SDK : a starter
from openai import AsyncOpenAI
from agents import Agent, Runner, OpenAIChatCompletionsModel
from agents import set_tracing_disabled
from openai.types.responses import ResponseTextDeltaEvent
import asyncio
external_client = AsyncOpenAI(
base_url = 'http://localhost:11434/v1',
api_key='ollama', # required, but unused
)