feat: add dimensions field to embed requests (#12242)

* feat: add field to truncate embeddings

* add openai embeddings for dimensions
This commit is contained in:
Michael Yang
2025-09-11 10:36:10 -07:00
committed by GitHub
parent 8a7e2055d2
commit feb18cd710
4 changed files with 16 additions and 9 deletions

View File

@@ -388,8 +388,12 @@ type EmbedRequest struct {
// this request.
KeepAlive *Duration `json:"keep_alive,omitempty"`
// Truncate truncates the input to fit the model's max sequence length.
Truncate *bool `json:"truncate,omitempty"`
// Dimensions truncates the output embedding to the specified dimension.
Dimensions int `json:"dimensions,omitempty"`
// Options lists model-specific options.
Options map[string]any `json:"options"`
}