Documentation
¶
Overview ¶
Package openai provides a model.Client implementation backed by the OpenAI Chat Completions API. It translates loom-mcp requests into ChatCompletion calls using github.com/sashabaranov/go-openai and maps responses back to the generic planner structures.
Package openai wires OpenAI model clients into loom-mcp planners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatClient ¶
type ChatClient interface {
CreateChatCompletion(ctx context.Context, request openai.ChatCompletionRequest) (
openai.ChatCompletionResponse, error)
}
ChatClient captures the subset of the go-openai client used by the adapter.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements model.Client via the OpenAI Chat Completions API.
func NewFromAPIKey ¶
NewFromAPIKey constructs a client using the default go-openai HTTP client.
type Options ¶
type Options struct {
Client ChatClient
DefaultModel string
}
Options configures the OpenAI adapter.
Click to show internal directories.
Click to hide internal directories.