diff options
author | Lain Soykaf <lain@lain.com> | 2024-05-14 15:09:38 +0400 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2024-05-14 15:09:38 +0400 |
commit | 1490ff30af7001adc386b4fec54c62e1a524d7d6 (patch) | |
tree | 2fcd912136ba6c0661b616c3b2c041722e31a73b | |
parent | bb08a766f4c1bd84c98e245c1871c46fcc7c7a8d (diff) | |
download | pleroma-1490ff30af7001adc386b4fec54c62e1a524d7d6.tar.gz pleroma-1490ff30af7001adc386b4fec54c62e1a524d7d6.zip |
QdrantSearch: Add query prefix.
-rw-r--r-- | lib/pleroma/search/qdrant_search.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/search/qdrant_search.ex b/lib/pleroma/search/qdrant_search.ex index 726a30b3b..31e7754ae 100644 --- a/lib/pleroma/search/qdrant_search.ex +++ b/lib/pleroma/search/qdrant_search.ex @@ -71,6 +71,8 @@ defmodule Pleroma.Search.QdrantSearch do @impl true def search(_user, query, _options) do + query = "Represent this sentence for searching relevant passages: #{query}" + with {:ok, embedding} <- get_embedding(query), {:ok, %{body: %{"result" => result}}} <- QdrantClient.post("/collections/posts/points/search", build_search_payload(embedding)) do |