mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 05:39:12 +00:00
Fix arg to generate_summary_from_file and type of this_iteration
This commit is contained in:
@@ -84,7 +84,7 @@ class InformationCollectionIteration:
|
|||||||
self,
|
self,
|
||||||
tool: str,
|
tool: str,
|
||||||
query: str,
|
query: str,
|
||||||
context: Dict[str, Dict] = None,
|
context: list = None,
|
||||||
onlineContext: dict = None,
|
onlineContext: dict = None,
|
||||||
codeContext: dict = None,
|
codeContext: dict = None,
|
||||||
summarizedResult: str = None,
|
summarizedResult: str = None,
|
||||||
|
|||||||
@@ -647,8 +647,8 @@ async def generate_summary_from_files(
|
|||||||
q,
|
q,
|
||||||
contextual_data,
|
contextual_data,
|
||||||
conversation_history=meta_log,
|
conversation_history=meta_log,
|
||||||
subscribed=subscribed,
|
|
||||||
uploaded_image_url=uploaded_image_url,
|
uploaded_image_url=uploaded_image_url,
|
||||||
|
user=user,
|
||||||
agent=agent,
|
agent=agent,
|
||||||
)
|
)
|
||||||
response_log = str(response)
|
response_log = str(response)
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ async def execute_information_collection(
|
|||||||
code_results: Dict = dict()
|
code_results: Dict = dict()
|
||||||
compiled_references: List[Any] = []
|
compiled_references: List[Any] = []
|
||||||
inferred_queries: List[Any] = []
|
inferred_queries: List[Any] = []
|
||||||
|
this_iteration = InformationCollectionIteration(tool=None, query=query)
|
||||||
previous_iterations_history = construct_iteration_history(previous_iterations, prompts.previous_iteration)
|
previous_iterations_history = construct_iteration_history(previous_iterations, prompts.previous_iteration)
|
||||||
|
|
||||||
async for result in apick_next_tool(
|
async for result in apick_next_tool(
|
||||||
@@ -163,7 +164,7 @@ async def execute_information_collection(
|
|||||||
):
|
):
|
||||||
if isinstance(result, dict) and ChatEvent.STATUS in result:
|
if isinstance(result, dict) and ChatEvent.STATUS in result:
|
||||||
yield result[ChatEvent.STATUS]
|
yield result[ChatEvent.STATUS]
|
||||||
else:
|
elif isinstance(result, InformationCollectionIteration):
|
||||||
this_iteration = result
|
this_iteration = result
|
||||||
|
|
||||||
if this_iteration.tool == ConversationCommand.Notes:
|
if this_iteration.tool == ConversationCommand.Notes:
|
||||||
|
|||||||
Reference in New Issue
Block a user