fix : Gemini embedding model only embeds the first text in a batch
This commit is contained in:
1 parent
3c5128a671
commit
ded1cde2ff
3 files changed
+43
-31
No files matched your search
+7
-3
@@ -216,10 +216,14 @@ type GeminiEmbeddingRequest struct {
|
||||
OutputDimensionality int `json:"outputDimensionality,omitempty"`
|
||||
}
|
||||
|
||||
type GeminiEmbeddingResponse struct {
|
||||
Embedding ContentEmbedding `json:"embedding"`
|
||||
type GeminiBatchEmbeddingRequest struct {
|
||||
Requests []*GeminiEmbeddingRequest `json:"requests"`
|
||||
}
|
||||
|
||||
type ContentEmbedding struct {
|
||||
type GeminiEmbedding struct {
|
||||
Values []float64 `json:"values"`
|
||||
}
|
||||
|
||||
type GeminiBatchEmbeddingResponse struct {
|
||||
Embeddings []*GeminiEmbedding `json:"embeddings"`
|
||||
}
|
||||
Reference in new issue
Block a user