Skip to content

Commit

Permalink
fix empty content issue (opea-project#476)
Browse files Browse the repository at this point in the history
Signed-off-by: letonghan <[email protected]>
  • Loading branch information
letonghan authored and BaoHuiling committed Aug 15, 2024
1 parent 2ea5f38 commit c1bbbc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comps/retrievers/haystack/qdrant/retriever_qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize_qdrant_retriever() -> QdrantEmbeddingRetriever:
@traceable(run_type="retriever")
def retrieve(input: EmbedDoc) -> SearchedDoc:
search_res = retriever.run(query_embedding=input.embedding)["documents"]
searched_docs = [TextDoc(text=r.content) for r in search_res]
searched_docs = [TextDoc(text=r.content) for r in search_res if r.content]
result = SearchedDoc(retrieved_docs=searched_docs, initial_query=input.text)
return result

Expand Down

0 comments on commit c1bbbc6

Please sign in to comment.