Commit 5d779e7
authored
fix(ollama): correctly parse nested embeddings array from ollama endpoint /api/embed (#1227)
* fix: correctly parse nested embeddings array from /api/embed
Updates the 'OllamaEmbeddingResponse' struct to match the official
Ollama API, which returns a nested 'embeddings: Vec<Vec<f32>>' array
instead of a flat 'embedding: Vec<f32>'.
* fix: remove trailing newline1 parent 67da574 commit 5d779e7
1 file changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| |||
0 commit comments