WP output fixes
This commit is contained in:
parent
d8a2a102e4
commit
449a41742d
@ -50,7 +50,7 @@ async def _search(title: str, limit: int = 5, fallback: bool = False) -> str:
|
|||||||
return f"No Wikipedia results found for '{title}'."
|
return f"No Wikipedia results found for '{title}'."
|
||||||
|
|
||||||
if fallback:
|
if fallback:
|
||||||
header = f"Article not found. Here are some similar results for '{title}':"
|
header = f"Article not found. Please select one of the following similar articles to proceed with '{title}':"
|
||||||
else:
|
else:
|
||||||
header = f"Search results for '{title}':"
|
header = f"Search results for '{title}':"
|
||||||
|
|
||||||
@ -61,6 +61,9 @@ async def _search(title: str, limit: int = 5, fallback: bool = False) -> str:
|
|||||||
# Brackets around title help the AI identify the exact string for subsequent calls
|
# Brackets around title help the AI identify the exact string for subsequent calls
|
||||||
lines.append(f"{i}. [{title_res}] - Snippet: {snippet}")
|
lines.append(f"{i}. [{title_res}] - Snippet: {snippet}")
|
||||||
|
|
||||||
|
if fallback:
|
||||||
|
lines.append("\n[Tip: Use the title in brackets [ ] to explore the selected page.]")
|
||||||
|
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
async def _fetch_content(title: str, section_index: int) -> Optional[str]:
|
async def _fetch_content(title: str, section_index: int) -> Optional[str]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user