mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 05:39:11 +00:00
Fix yield for scraping direct web page
This commit is contained in:
@@ -195,6 +195,7 @@ async def execute_information_collection(
|
||||
this_iteration.onlineContext = online_results
|
||||
|
||||
elif this_iteration.data_source == ConversationCommand.Webpage:
|
||||
try:
|
||||
async for result in read_webpages(
|
||||
this_iteration.query,
|
||||
conversation_history,
|
||||
@@ -219,9 +220,9 @@ async def execute_information_collection(
|
||||
|
||||
for webpage in direct_web_pages[web_query]["webpages"]:
|
||||
webpages.append(webpage["link"])
|
||||
yield send_status_func(f"**Read web pages**: {webpages}")
|
||||
|
||||
this_iteration.onlineContext = online_results
|
||||
except Exception as e:
|
||||
logger.error(f"Error reading webpages: {e}", exc_info=True)
|
||||
|
||||
# TODO: Fix summarize later
|
||||
# elif this_iteration.data_source == ConversationCommand.Summarize:
|
||||
|
||||
Reference in New Issue
Block a user