fix:dimensions not sent in embedding API requests (#1654)

fix:dimensions not sent in embedding API requests
This commit is contained in:
MaoMeng
2026-06-15 17:32:23 +08:00
committed by GitHub
parent a997441392
commit cf0a64b88e
7 changed files with 29 additions and 10 deletions
+4 -3
View File
@@ -88,9 +88,10 @@ func (e *OllamaEmbedder) BatchEmbed(ctx context.Context, texts []string) ([][]fl
// Create request
req := &ollamaapi.EmbedRequest{
Model: e.modelName,
Input: texts,
Options: make(map[string]interface{}),
Model: e.modelName,
Input: texts,
Dimensions: e.dimensions,
Options: make(map[string]interface{}),
}
// Set truncation parameters