openai

package
v0.0.0-...-293a3f4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 15 Imported by: 0

README

OpenAI

Roadmap

  • Chat-completion
    • Streaming
    • System prompt
    • Tool use
    • Structured output
    • Multi-modal input
    • Multi-modal output
  • Embedding

Documentation

Index

Constants

View Source
const (
	ChatCompleteModelGPT4o      = ChatCompleteModel(openai.ChatModelGPT4o)
	ChatCompleteModelGPT4oMini  = ChatCompleteModel(openai.ChatModelGPT4oMini)
	ChatCompleteModelGPT5       = ChatCompleteModel(openai.ChatModelGPT5)
	ChatCompleteModelGPT5Mini   = ChatCompleteModel(openai.ChatModelGPT5Mini)
	ChatCompleteModelGPT5Nano   = ChatCompleteModel(openai.ChatModelGPT5Nano)
	ChatCompleteModelGPT5_1     = ChatCompleteModel(openai.ChatModelGPT5_1)
	ChatCompleteModelGPT5_1Mini = ChatCompleteModel(openai.ChatModelGPT5_1Mini)
	ChatCompleteModelGPT5_2     = ChatCompleteModel(openai.ChatModelGPT5_2)
	ChatCompleteModelGPT5_2Pro  = ChatCompleteModel(openai.ChatModelGPT5_2Pro)
)
View Source
const (
	EmbedModelTextEmbedding3Large = EmbedModel(openai.EmbeddingModelTextEmbedding3Large)
	EmbedModelTextEmbedding3Small = EmbedModel(openai.EmbeddingModelTextEmbedding3Small)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatCompleteModel

type ChatCompleteModel string

type ChatCompleter

type ChatCompleter struct {
	Client openai.Client
	// contains filtered or unexported fields
}

func (*ChatCompleter) ChatComplete

ChatComplete satisfies gai.ChatCompleter.

type Client

type Client struct {
	Client openai.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts NewClientOptions) *Client

func (*Client) NewChatCompleter

func (c *Client) NewChatCompleter(opts NewChatCompleterOptions) *ChatCompleter

func (*Client) NewEmbedder

func (c *Client) NewEmbedder(opts NewEmbedderOptions) *Embedder

type EmbedModel

type EmbedModel string

type Embedder

type Embedder struct {
	Client openai.Client
	// contains filtered or unexported fields
}

func (*Embedder) Embed

Embed satisfies gai.Embedder.

type NewChatCompleterOptions

type NewChatCompleterOptions struct {
	Model ChatCompleteModel
}

type NewClientOptions

type NewClientOptions struct {
	BaseURL string
	Key     string
	Log     *slog.Logger
}

type NewEmbedderOptions

type NewEmbedderOptions struct {
	Dimensions int
	Model      EmbedModel
}

Jump to

Keyboard shortcuts

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