mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-03 05:48:42 +00:00
QdrantSearch: Add query prefix.
This commit is contained in:
parent
bb08a766f4
commit
1490ff30af
1 changed files with 2 additions and 0 deletions
|
@ -71,6 +71,8 @@ defmodule Pleroma.Search.QdrantSearch do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def search(_user, query, _options) do
|
def search(_user, query, _options) do
|
||||||
|
query = "Represent this sentence for searching relevant passages: #{query}"
|
||||||
|
|
||||||
with {:ok, embedding} <- get_embedding(query),
|
with {:ok, embedding} <- get_embedding(query),
|
||||||
{:ok, %{body: %{"result" => result}}} <-
|
{:ok, %{body: %{"result" => result}}} <-
|
||||||
QdrantClient.post("/collections/posts/points/search", build_search_payload(embedding)) do
|
QdrantClient.post("/collections/posts/points/search", build_search_payload(embedding)) do
|
||||||
|
|
Loading…
Reference in a new issue