# Functions
NewClient creates a new OpenAI HTTP API client and returns it.
NewEmbedder creates a client that implements embeddings.Embedder.
WithAPIKey sets the API key.
WithBaseURL sets the API base URL.
WithHTTPClient sets the HTTP client.
WithOrgID sets the organization ID.
WithVersion sets the API version.
# Constants
BaseURL is OpenAI HTTP API base URL.
EmbedAPIVersion is the latest stable embeddings API version.
EncodingBase64 makes OpenAI API return embeddings encoded as base64 string.
No description provided by the author
OrgHeader is an Organization header.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ErrInValidData is returned when the API client fails to decode the returned data.
ErrUnsupportedEncoding is returned when API client attempts to use unsupported encoding format.
# Structs
APIError is open AI API error.
Client is an OpenAI HTTP API client.
Data stores vector embeddings.
DataGen is a generic struct used for deserializing vector embeddings.
EmbeddingRequest is serialized and sent to the API server.
EmbeddingResponseGen is the API response.
EmbeddingResponseGen is a generic struct used for deserializing API response.
No description provided by the author
Usage tracks API token usage.
# Type aliases
EncodingFormat for embedding API requests.
Model is embedding model.
Option is functional option.