QdrantSearch: Add query prefix.
This commit is contained in:
parent
bb08a766f4
commit
1490ff30af
@ -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 New Issue
Block a user