openai Package
Last updated
This page lists the exported API of core/openai, the embedding client used for ToriiDB vector operations.
Client
type Client struct {
APIKey string
Dim int
Model string
}
func New(apiKey string) (*Client, error)
func (c *Client) Embed(ctx context.Context, text string) ([]float32, error)
Embed rejects blank text, returns <status>: <body> for non-200 responses, and fails when the vector length differs from Dim.