Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai_provider_ollama
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ai_provider_ollama
Commits
19adb295
Commit
19adb295
authored
1 month ago
by
Christian Crawford
Browse files
Options
Downloads
Plain Diff
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
1 month ago
Stage: build
Stage: validate
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OllamaControlApi.php
+2
-2
2 additions, 2 deletions
src/OllamaControlApi.php
src/Plugin/AiProvider/OllamaProvider.php
+1
-1
1 addition, 1 deletion
src/Plugin/AiProvider/OllamaProvider.php
with
3 additions
and
3 deletions
src/OllamaControlApi.php
+
2
−
2
View file @
19adb295
...
...
@@ -62,8 +62,8 @@ class OllamaControlApi {
* The response.
*/
public
function
embeddings
(
$text
,
$model
)
{
$result
=
json_decode
(
$this
->
makeRequest
(
"api/embed
dings
"
,
[],
'POST'
,
[
'
promp
t'
=>
$text
,
$result
=
json_decode
(
$this
->
makeRequest
(
"api/embed"
,
[],
'POST'
,
[
'
inpu
t'
=>
$text
,
'model'
=>
$model
,
]),
TRUE
);
return
$result
;
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/AiProvider/OllamaProvider.php
+
1
−
1
View file @
19adb295
...
...
@@ -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
[
'embedding
s'
][
0
],
$response
,
[]);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment