Skip to content
Snippets Groups Projects
Commit 19adb295 authored by Christian Crawford's avatar Christian Crawford
Browse files

Merge branch '3501534-update-embedding-endpoint' into '1.1.x'

Issue #3501534: Update embedding endpoint

See merge request !4
parents 9fdc201f 252ee52c
No related branches found
No related tags found
No related merge requests found
Pipeline #463240 passed
......@@ -62,8 +62,8 @@ class OllamaControlApi {
* The response.
*/
public function embeddings($text, $model) {
$result = json_decode($this->makeRequest("api/embeddings", [], 'POST', [
'prompt' => $text,
$result = json_decode($this->makeRequest("api/embed", [], 'POST', [
'input' => $text,
'model' => $model,
]), TRUE);
return $result;
......
......@@ -285,7 +285,7 @@ class OllamaProvider extends AiProviderClientBase implements
}
$response = $this->controlApi->embeddings($input, $model_id);
return new EmbeddingsOutput($response['embedding'], $response, []);
return new EmbeddingsOutput($response['embeddings'][0], $response, []);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment