Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmbeddingData ¶
type TextEmbeddingsRequest ¶
type TextEmbeddingsRequest struct {
// Input Input text to embed (required)
Input []string `json:"input,omitempty"`
// Model ID of the model to use (required)
Model string `json:"model,omitempty"`
// Dimensions (optional) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
Dimensions int `json:"dimensions,omitempty"`
// EncodingFormat (optional) "float" or "base64"
EncodingFormat string `json:"encoding_format,omitempty"`
// User (optional) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
User string `json:"user,omitempty"`
}
func (*TextEmbeddingsRequest) InputRuneCount ¶
func (te *TextEmbeddingsRequest) InputRuneCount() int
func (*TextEmbeddingsRequest) String ¶
func (te *TextEmbeddingsRequest) String() string
type TextEmbeddingsResponse ¶
type TextEmbeddingsResponse struct {
Data []EmbeddingData `json:"data"`
Model string `json:"model"`
Object string `json:"object"`
Usage Usage `json:"usage"`
}
func (*TextEmbeddingsResponse) Embedding ¶
func (te *TextEmbeddingsResponse) Embedding() []float64
func (*TextEmbeddingsResponse) String ¶
func (te *TextEmbeddingsResponse) String() string
Click to show internal directories.
Click to hide internal directories.