package
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Mar 9, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type EmbeddingData struct {
Embedding []float32 `json:"embedding"`
Index int `json:"index"`
}
type EmbeddingRequest struct {
Model string `json:"model"`
Input []string `json:"input"`
InputType string `json:"input_type,omitempty"`
Truncate string `json:"truncate,omitempty"`
}
type EmbeddingResponse struct {
Object string `json:"object"`
Data []EmbeddingData `json:"data"`
Model string `json:"model"`
Usage Usage `json:"usage"`
}
type ErrorResponse struct {
Error struct {
Message string `json:"message"`
Type string `json:"type"`
Code string `json:"code,omitempty"`
} `json:"error"`
}
type Usage struct {
PromptTokens int `json:"prompt_tokens"`
TotalTokens int `json:"total_tokens"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.