openai

package
v0.0.0-...-695adab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAILLM

type OpenAILLM struct {
	Ctx    context.Context
	Client openai.Client

	Provider string

	Tools []openai.ChatCompletionToolParam

	ModelName string
	Model     *openai.Model

	Instructions string

	Effort string

	Logger *slog.Logger

	Memory *memory.Memory

	ToolsServers map[string]*mcp.MCPServer

	RequestParams *providers.RequestParams
}

func NewOpenAILLM

func NewOpenAILLM(ctx context.Context, modelName, effort, instructions string, req *providers.RequestParams, config *config.AgentsConfig) (*OpenAILLM, error)

func (*OpenAILLM) AttachTools

func (llm *OpenAILLM) AttachTools(mcpServers map[string]*mcp.MCPServer, includeTools, excludeTools []string) error

func (OpenAILLM) Generate

func (llm OpenAILLM) Generate(message string) ([]mcp_tool.Content, error)

func (OpenAILLM) GetModel

func (llm OpenAILLM) GetModel(name string) (any, error)

func (*OpenAILLM) Initialize

func (llm *OpenAILLM) Initialize() error

func (OpenAILLM) ListModels

func (llm OpenAILLM) ListModels() (any, error)

func (OpenAILLM) Structured

func (llm OpenAILLM) Structured(message string, reponseStruct any) ([]mcp_tool.Content, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL