Documentation
¶
Overview ¶
Package openai provides an OpenAI-compatible API client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBaseURL = &url.URL{
Scheme: "https",
Host: "api.openai.com",
Path: "/v1",
}
DefaultBaseURL is the default base URL for the OpenAI API.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.1.4
type Client struct { Chat *chat.ChatService Embeddings *embeddings.EmbeddingsService // contains filtered or unexported fields }
A Client is an OpenAI-compatible API client.
type ClientOpt ¶ added in v0.1.4
type ClientOpt func(*Client)
A ClientOpt is a functional option for configuring a Client.
func WithBaseURL ¶ added in v0.1.4
WithBaseURL sets the base URL for the Client.
The default value is "https://api.openai.com/v1".
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
httptesting
Package httptesting provides internal testing utilities.
|
Package httptesting provides internal testing utilities. |
service
Package service provides common types used by services.
|
Package service provides common types used by services. |
pkg
|
|
chat
Package chat provides a chat client for the OpenAI API.
|
Package chat provides a chat client for the OpenAI API. |
embeddings
Package embeddings provides a embeddings client for the OpenAI API.
|
Package embeddings provides a embeddings client for the OpenAI API. |
Click to show internal directories.
Click to hide internal directories.