Skip to content

Commit

Permalink
Merge pull request #143 from bioimage-io/fix-web-browse
Browse files Browse the repository at this point in the history
Fix web-browse in web search extension
  • Loading branch information
oeway authored Jun 9, 2024
2 parents 3c8eea9 + f5d319e commit 244247e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ async def browse_web_pages(query: str=Field(description="keywords or a sentence
print("LLM_Web_search | Could not find any page content "
"similar enough to be extracted, using basic search fallback...")
return "No relevant information found."
return documents

#return the json serializable documents
return [doc.page_content + '\nsource: ' + doc.metadata.get('source') for doc in documents]

@schema_tool
async def read_webpage(url: str=Field(description="the web url to read")) -> str:
Expand All @@ -66,5 +66,5 @@ def get_extension():
id="web",
name="Search Web",
description="Search the web for information using duckduckgo. Search by keywords and returns a list of relevant documents.",
tools=dict(search=search_web, browse=browse_web_pages, read=read_webpage)
tools=dict(search=search_web, browse=browse_web_pages)
)
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.2.7"
version = "0.2.8"
readme = "README.md"
description = "Your Personal Assistant in Computational BioImaging."
dependencies = [
Expand Down

0 comments on commit 244247e

Please sign in to comment.