mirror of
https://github.com/ollama/ollama.git
synced 2025-12-08 09:12:48 +01:00
feat: add dimensions field to embed requests (#12242)
* feat: add field to truncate embeddings * add openai embeddings for dimensions
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user