Commit c09cd30c authored by Шаронов Егор Алексеевич's avatar Шаронов Егор Алексеевич
Browse files

ollama host

parent 56c8f09a
No related merge requests found
Pipeline #172773 passed with stages
in 1 minute and 52 seconds
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment