Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Edadil
MS
model
Commits
c09cd30c
Commit
c09cd30c
authored
1 week ago
by
Шаронов Егор Алексеевич
Browse files
Options
Download
Patches
Plain Diff
ollama host
parent
56c8f09a
master
No related merge requests found
Pipeline
#172773
passed with stages
in 1 minute and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
internal/repository/postgres.go
+1
-1
internal/repository/postgres.go
with
1 addition
and
1 deletion
+1
-1
internal/repository/postgres.go
+
1
−
1
View file @
c09cd30c
...
...
@@ -104,7 +104,7 @@ func (r *storeRepository) GetProductsByQuery(ctx context.Context, queryStr strin
SELECT ap.abstract_product_id as id, ap.name, ap.priority_data as content
FROM products_embeddings_store pes
JOIN abstract_products ap ON pes.abstract_product_id = ap.abstract_product_id
ORDER BY pes.embedding <=> ai.ollama_embed(?, ?, host => 'http://
host.docker.internal
:11434')
ORDER BY pes.embedding <=> ai.ollama_embed(?, ?, host => 'http://
ollama
:11434')
LIMIT ?
`
if
err
:=
r
.
db
.
WithContext
(
ctx
)
.
Raw
(
sqlQuery
,
r
.
embedder
,
queryStr
,
limit
)
.
Scan
(
&
products
)
.
Error
;
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets