openai

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter is the OpenAI-compatible Chat Completions protocol adapter.

func NewAdapter

func NewAdapter(httpClient *http.Client) *Adapter

NewAdapter creates a Chat Completions adapter that uses httpClient for requests. A nil client uses http.DefaultClient.

func (*Adapter) Protocol

func (a *Adapter) Protocol() llm.Protocol

Protocol returns the registry key for the Chat Completions protocol.

func (*Adapter) Stream

func (a *Adapter) Stream(
	ctx context.Context,
	model llm.Model,
	input llm.Context,
	options llm.StreamOptions,
) (<-chan llm.Event, error)

Stream delegates the request to the Chat Completions implementation.

type ResponsesAdapter added in v0.6.3

type ResponsesAdapter struct {
	// contains filtered or unexported fields
}

ResponsesAdapter is the OpenAI Responses protocol adapter.

func NewResponsesAdapter added in v0.6.3

func NewResponsesAdapter(httpClient *http.Client) *ResponsesAdapter

NewResponsesAdapter creates a Responses adapter that uses httpClient for requests. A nil client uses http.DefaultClient.

func (*ResponsesAdapter) Protocol added in v0.6.3

func (a *ResponsesAdapter) Protocol() llm.Protocol

Protocol returns the registry key for the Responses protocol.

func (*ResponsesAdapter) Stream added in v0.6.3

func (a *ResponsesAdapter) Stream(
	ctx context.Context,
	model llm.Model,
	input llm.Context,
	options llm.StreamOptions,
) (<-chan llm.Event, error)

Stream delegates the request to the Responses implementation.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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