Initial Draft
This commit is contained in:
@@ -210,7 +210,10 @@ type EmbeddingRequest struct {
|
||||
Model string `json:"model"`
|
||||
|
||||
// Prompt is the textual prompt to embed.
|
||||
Prompt string `json:"prompt"`
|
||||
Prompt string `json:"prompt,omitempty"`
|
||||
|
||||
// PromptBatch is a list of prompts to embed.
|
||||
PromptBatch []string `json:"prompt_batch,omitempty"`
|
||||
|
||||
// KeepAlive controls how long the model will stay loaded in memory following
|
||||
// this request.
|
||||
@@ -222,7 +225,8 @@ type EmbeddingRequest struct {
|
||||
|
||||
// EmbeddingResponse is the response from [Client.Embeddings].
|
||||
type EmbeddingResponse struct {
|
||||
Embedding []float64 `json:"embedding"`
|
||||
Embedding []float64 `json:"embedding,omitempty"`
|
||||
EmbeddingBatch [][]float64 `json:"embedding_batch,omitempty"`
|
||||
}
|
||||
|
||||
// CreateRequest is the request passed to [Client.Create].
|
||||
|
||||
Reference in New Issue
Block a user