modulepackage
0.0.0-20250227163240-2076619a8613
Repository: https://github.com/agent-api/openai.git
Documentation: pkg.go.dev
# README
OpenAI agent-api
provider
The OpenAI provider for agent-api
š·šļø The OpenAI provider is a work in progress and the API may change unexpectedly.
Usage
// Create an openai provider
provider := openai.NewProvider(&openai.ProviderOpts{})
provider.UseModel(ctx, gpt4o.GPT4_O)
// Create a new agent-api agent with openai
myAgent := agent.NewAgent(&agent.NewAgentConfig{
Provider: provider,
SystemPrompt: "You are a helpful assistant.",
})
// Send a message to the agent
response, err := myAgent.Run(ctx, "Why is the sky blue?", agent.DefaultStopCondition)
# Functions
NewProvider creates a new Ollama provider.
# Structs
Provider implements the LLMProvider interface for OpenAI.
No description provided by the author