openai

package
v0.0.0-...-e3ae68d Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenAIURL = "https://api.openai.com/v1"
	OllamaURL = "http://localhost:11434/v1"
	GeminiURL = "https://generativelanguage.googleapis.com/v1beta/openai"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(apiBase string, apiKey string, opts ...Option) (chat.Client, error)

NewClient returns a chat client that can begin chat sessions with an LLM service that speaks the OpenAI chat completion API.

Types

type API

type API int
const (
	ChatCompletions API = iota
	Responses
)

type Option

type Option func(*client)

func WithAPI

func WithAPI(api API) Option

func WithDebug

func WithDebug(debug bool) Option

func WithModel

func WithModel(modelName string) Option

Jump to

Keyboard shortcuts

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