Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash-latest")
|
|
| 43 |
@tool
|
| 44 |
def wikipedia_search(title: str) -> str:
|
| 45 |
"""Provides a short snippet from a Wikipedia article with the given title"""
|
| 46 |
-
page = wikipedia.page(title)
|
| 47 |
return page.content[:300]
|
| 48 |
|
| 49 |
def agent_node(state: OrderState) -> OrderState:
|
|
@@ -82,7 +82,7 @@ def interactive_tools_node(state: OrderState) -> OrderState:
|
|
| 82 |
|
| 83 |
if tool_name == "wikipedia_search":
|
| 84 |
print(str(tool_args))
|
| 85 |
-
page = wikipedia.page(tool_args.get("title"))
|
| 86 |
response = page.content[:300]
|
| 87 |
|
| 88 |
else:
|
|
|
|
| 43 |
@tool
|
| 44 |
def wikipedia_search(title: str) -> str:
|
| 45 |
"""Provides a short snippet from a Wikipedia article with the given title"""
|
| 46 |
+
page = wikipedia.page(title, auto_suggest=False)
|
| 47 |
return page.content[:300]
|
| 48 |
|
| 49 |
def agent_node(state: OrderState) -> OrderState:
|
|
|
|
| 82 |
|
| 83 |
if tool_name == "wikipedia_search":
|
| 84 |
print(str(tool_args))
|
| 85 |
+
page = wikipedia.page(tool_args.get("title"), auto_suggest=False)
|
| 86 |
response = page.content[:300]
|
| 87 |
|
| 88 |
else:
|