Skip to content

Commit

Permalink
Fix web search
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Mar 12, 2024
1 parent 6a059f0 commit 73eb811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def search_duckduckgo(query: str, langchain_compressor: LangchainCompresso
async with AsyncDDGS() as ddgs:
if instant_answers:
answer_list = []
async for answer in ddgs.answers(query):
for answer in await ddgs.answers(query):
answer_list.append(answer)
if answer_list:
max_results -= 1 # We already have 1 result now
Expand All @@ -26,7 +26,7 @@ async def search_duckduckgo(query: str, langchain_compressor: LangchainCompresso

results = []
result_urls = []
async for result in ddgs.text(query, region='wt-wt', safesearch='moderate', timelimit=None,
for result in await ddgs.text(query, region='wt-wt', safesearch='moderate', timelimit=None,
max_results=num_results_to_process):
results.append(result)
result_urls.append(result["href"])
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]

[project]
name = "bioimageio-chatbot"
version = "0.1.76"
version = "0.1.77"
readme = "README.md"
description = "Your Personal Assistant in BioImage Analysis."
dependencies = [
Expand Down

0 comments on commit 73eb811

Please sign in to comment.