mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Fix constructing status update strings for intermediate chat steps
This commit is contained in:
parent
d15b9bc272
commit
0819b83d0b
2 changed files with 6 additions and 3 deletions
|
@ -71,7 +71,8 @@ async def search_online(
|
|||
if webpage_links:
|
||||
logger.info(f"🌐👀 Reading web pages at: {list(webpage_links)}")
|
||||
if send_status_func:
|
||||
await send_status_func(f"**📖 Reading web pages**: {'\n- ' + '\n- '.join(list(webpage_links))}")
|
||||
webpage_links_str = "\n- " + "\n- ".join(list(webpage_links))
|
||||
await send_status_func(f"**📖 Reading web pages**: {webpage_links_str}")
|
||||
tasks = [read_webpage_and_extract_content(subquery, link) for link, subquery in webpage_links.items()]
|
||||
results = await asyncio.gather(*tasks)
|
||||
|
||||
|
@ -113,7 +114,8 @@ async def read_webpages(
|
|||
|
||||
logger.info(f"Reading web pages at: {urls}")
|
||||
if send_status_func:
|
||||
await send_status_func(f"**📖 Reading web pages**: {'\n- ' + '\n- '.join(list(urls))}")
|
||||
webpage_links_str = "\n- " + "\n- ".join(list(urls))
|
||||
await send_status_func(f"**📖 Reading web pages**: {webpage_links_str}")
|
||||
tasks = [read_webpage_and_extract_content(query, url) for url in urls]
|
||||
results = await asyncio.gather(*tasks)
|
||||
|
||||
|
|
|
@ -347,7 +347,8 @@ async def extract_references_and_questions(
|
|||
result_list = []
|
||||
logger.info(f"🔍 Searching knowledge base with queries: {inferred_queries}")
|
||||
if send_status_func:
|
||||
await send_status_func(f"**🔍 Searching Documents for:** {'\n- ' + '\n- '.join(inferred_queries)}")
|
||||
inferred_queries_str = "\n- " + "\n- ".join(inferred_queries)
|
||||
await send_status_func(f"**🔍 Searching Documents for:** {inferred_queries_str}")
|
||||
for query in inferred_queries:
|
||||
n_items = min(n, 3) if using_offline_chat else n
|
||||
result_list.extend(
|
||||
|
|
Loading…
Reference in a new issue