Skip to content

Commit

Permalink
enable parameter k to get web resources (opea-project#844)
Browse files Browse the repository at this point in the history
Signed-off-by: letonghan <[email protected]>
  • Loading branch information
letonghan authored Nov 1, 2024
1 parent 6dbb0a7 commit 9f68bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comps/web_retrievers/chroma/langchain/retriever_chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def web_retrieve(input: EmbedDoc) -> SearchedDoc:
embedding = input.embedding

# Google Search the results, parse the htmls
search_results = get_urls(query)
search_results = get_urls(query=query, num_search_result=input.k)
urls_to_look = []
for res in search_results:
if res.get("link", None):
Expand All @@ -94,7 +94,7 @@ async def web_retrieve(input: EmbedDoc) -> SearchedDoc:
dump_docs(unique_documents)

# Do the retrieval
search_res = await vector_db.asimilarity_search_by_vector(embedding=embedding)
search_res = await vector_db.asimilarity_search_by_vector(embedding=embedding, k=input.k)

searched_docs = []

Expand Down

0 comments on commit 9f68bd3

Please sign in to comment.