Andrei Sferdian commited on
Commit ·
8b65802
1
Parent(s): 929e339
Fix file not being sent
Browse files- app.py +2 -3
- tools/wikipedia.py +2 -2
app.py
CHANGED
|
@@ -93,9 +93,8 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 93 |
responses = agent.batch(
|
| 94 |
[
|
| 95 |
{
|
| 96 |
-
"messages": [
|
| 97 |
-
|
| 98 |
-
],
|
| 99 |
}
|
| 100 |
],
|
| 101 |
RunnableConfig(
|
|
|
|
| 93 |
responses = agent.batch(
|
| 94 |
[
|
| 95 |
{
|
| 96 |
+
"messages": [HumanMessage(content=question_text)],
|
| 97 |
+
"file_name": task.get("file_name"),
|
|
|
|
| 98 |
}
|
| 99 |
],
|
| 100 |
RunnableConfig(
|
tools/wikipedia.py
CHANGED
|
@@ -16,7 +16,7 @@ class WikipediaPage(BaseModel):
|
|
| 16 |
sections: List[str]
|
| 17 |
|
| 18 |
|
| 19 |
-
@tool()
|
| 20 |
def find_wiki_page(query: str) -> str | None:
|
| 21 |
"""
|
| 22 |
Searches for a Wikipedia page based on the provided query and returns its summary and sections.
|
|
@@ -116,7 +116,7 @@ def _compare_heading_levels(heading1: str | Tag, heading2: str | Tag) -> int:
|
|
| 116 |
return 0
|
| 117 |
|
| 118 |
|
| 119 |
-
@tool()
|
| 120 |
def get_wiki_page_section_by_title(page_title: str, section_title: str) -> str | None:
|
| 121 |
"""
|
| 122 |
Retrieve the content of a specific section from a Wikipedia page.
|
|
|
|
| 16 |
sections: List[str]
|
| 17 |
|
| 18 |
|
| 19 |
+
@tool(parse_docstring=True)
|
| 20 |
def find_wiki_page(query: str) -> str | None:
|
| 21 |
"""
|
| 22 |
Searches for a Wikipedia page based on the provided query and returns its summary and sections.
|
|
|
|
| 116 |
return 0
|
| 117 |
|
| 118 |
|
| 119 |
+
@tool(parse_docstring=True)
|
| 120 |
def get_wiki_page_section_by_title(page_title: str, section_title: str) -> str | None:
|
| 121 |
"""
|
| 122 |
Retrieve the content of a specific section from a Wikipedia page.
|