mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
update types of prev iterations response
This commit is contained in:
@@ -27,9 +27,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class InformationCollectionIteration:
|
class InformationCollectionIteration:
|
||||||
def __init__(
|
def __init__(self, data_source: str, query: str, context: str = None, onlineContext: dict = None):
|
||||||
self, data_source: str, query: str, context: str = None, onlineContext: str = None, result: Any = None
|
|
||||||
):
|
|
||||||
self.data_source = data_source
|
self.data_source = data_source
|
||||||
self.query = query
|
self.query = query
|
||||||
self.context = context
|
self.context = context
|
||||||
@@ -260,7 +258,7 @@ async def execute_information_collection(
|
|||||||
if isinstance(response, dict) and ChatEvent.STATUS in response:
|
if isinstance(response, dict) and ChatEvent.STATUS in response:
|
||||||
yield response[ChatEvent.STATUS]
|
yield response[ChatEvent.STATUS]
|
||||||
else:
|
else:
|
||||||
response_log = response
|
response_log = response # type: ignore
|
||||||
previous_iterations.append(
|
previous_iterations.append(
|
||||||
InformationCollectionIteration(
|
InformationCollectionIteration(
|
||||||
data_source=this_iteration.data_source,
|
data_source=this_iteration.data_source,
|
||||||
|
|||||||
Reference in New Issue
Block a user