Spaces:
Sleeping
Sleeping
File size: 1,133 Bytes
0854b6e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from typing import List, Optional, TypedDict
from langchain_core.messages import AIMessage, HumanMessage
class AgentState(TypedDict):
"""
Represents the state of an agent during a multi-step query process.
Attributes:
original_query (str): The initial query provided by the user.
subqueries (List[str]): A list of subqueries derived from the
original query.
current_step (int): The index of the current step or subquery
being processed.
results (List[str]): The results obtained for each subquery.
final_answer (Optional[str]): The final answer generated by the agent,
if available.
messages (List[HumanMessage | AIMessage]): The conversation history,
including both human and AI
messages.
"""
original_query: str
subqueries: List[str]
current_step: int
results: List[str]
final_answer: Optional[str]
messages: List[HumanMessage | AIMessage]
|