QdrantSearch: Add query prefix.

This commit is contained in:
Lain Soykaf 2024-05-14 15:09:38 +04:00
parent bb08a766f4
commit 1490ff30af

View File

@ -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