naman1102 commited on
Commit
6de4fb1
·
1 Parent(s): 935cde9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -9,8 +9,8 @@ from langgraph.graph import Graph, StateGraph
9
  from langgraph.prebuilt import ToolNode
10
  from tools import simple_search
11
  from huggingface_hub import InferenceClient
12
- from langgraph.graph import State
13
- from typing import Annotated
14
  from typing_extensions import TypedDict
15
  print("trial")
16
  # (Keep Constants as is)
@@ -19,12 +19,14 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
19
  HF_TOKEN = os.getenv("HF_TOKEN") # Make sure to set this environment variable
20
 
21
 
 
 
22
  class AgentState(TypedDict):
23
- question: Annotated[str, State.Immutable]
24
  current_step: str
25
  tool_output: str
26
  final_answer: str
27
- history: Annotated[List[Dict[str, str]], State.MergingList]
28
  needs_more_info: bool
29
  search_query: str
30
 
 
9
  from langgraph.prebuilt import ToolNode
10
  from tools import simple_search
11
  from huggingface_hub import InferenceClient
12
+ # from langgraph.graph import State
13
+ # from typing import Annotated
14
  from typing_extensions import TypedDict
15
  print("trial")
16
  # (Keep Constants as is)
 
19
  HF_TOKEN = os.getenv("HF_TOKEN") # Make sure to set this environment variable
20
 
21
 
22
+ from typing import TypedDict, List, Dict
23
+
24
  class AgentState(TypedDict):
25
+ question: str
26
  current_step: str
27
  tool_output: str
28
  final_answer: str
29
+ history: List[Dict[str, str]]
30
  needs_more_info: bool
31
  search_query: str
32