Skip to content

agent-api/openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

The OpenAI provider for agent-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages