mirror of
https://github.com/ollama/ollama.git
synced 2025-07-28 19:33:14 +02:00
server: return empty slice on empty /api/embed
request (#5713)
* server: return empty slice on empty `/api/embed` request * fix tests
This commit is contained in:
@@ -206,7 +206,7 @@ type EmbedRequest struct {
|
||||
// EmbedResponse is the response from [Client.Embed].
|
||||
type EmbedResponse struct {
|
||||
Model string `json:"model"`
|
||||
Embeddings [][]float32 `json:"embeddings,omitempty"`
|
||||
Embeddings [][]float32 `json:"embeddings"`
|
||||
}
|
||||
|
||||
// EmbeddingRequest is the request passed to [Client.Embeddings].
|
||||
|
Reference in New Issue
Block a user