logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 1490ff30af7001adc386b4fec54c62e1a524d7d6
parent bb08a766f4c1bd84c98e245c1871c46fcc7c7a8d
Author: Lain Soykaf <lain@lain.com>
Date:   Tue, 14 May 2024 15:09:38 +0400

QdrantSearch: Add query prefix.

Diffstat:

Mlib/pleroma/search/qdrant_search.ex2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git 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