openai

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 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 Client

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

Client wraps the OpenAI client with our configuration

func NewClient

func NewClient(cfg *config.OpenAIConfig) *Client

NewClient creates a new OpenAI client with the given API key

func (*Client) ChatCompletion

func (c *Client) ChatCompletion(ctx context.Context, messages []openai.ChatCompletionMessageParamUnion) (*openai.ChatCompletion, error)

ChatCompletion handles chat completion requests

func (*Client) ChatCompletionStream

ChatCompletionStream handles streaming chat completion requests

Jump to

Keyboard shortcuts

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