dipan004 sahil-1-garg commited on
Commit
2f16cc8
·
verified ·
1 Parent(s): 532f273

Update agents/langgraph.py (#12)

Browse files

- Update agents/langgraph.py (a4b44edc641ff7076fb5035f7f73290bba6d78e2)


Co-authored-by: sahilgarg <sahil-1-garg@users.noreply.huggingface.co>

Files changed (1) hide show
  1. agents/langgraph.py +5 -1
agents/langgraph.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import TypedDict, Dict, Any, List, Annotated
2
  import time, uuid, os
3
  from langgraph.graph import StateGraph, END
4
  from langchain_core.messages import HumanMessage, AIMessage, BaseMessage
@@ -18,6 +18,8 @@ class FinancialAgentState(TypedDict):
18
  start_time: float
19
  end_time: float
20
  error: str
 
 
21
 
22
  def make_workflow(tool_func):
23
  def node(state: FinancialAgentState) -> FinancialAgentState:
@@ -65,6 +67,8 @@ def run_workflow(file_path: str, kind: str, **kwargs) -> Dict[str, Any]:
65
  start_time=0,
66
  end_time=0,
67
  error="",
 
 
68
  )
69
  # Add feedback_context if provided
70
  if "feedback_context" in kwargs:
 
1
+ from typing import TypedDict, Dict, Any, List, Annotated, Optional
2
  import time, uuid, os
3
  from langgraph.graph import StateGraph, END
4
  from langchain_core.messages import HumanMessage, AIMessage, BaseMessage
 
18
  start_time: float
19
  end_time: float
20
  error: str
21
+ user_api_key: Optional[str]
22
+ feedback_context: Optional[Dict[str, Any]]
23
 
24
  def make_workflow(tool_func):
25
  def node(state: FinancialAgentState) -> FinancialAgentState:
 
67
  start_time=0,
68
  end_time=0,
69
  error="",
70
+ user_api_key=None,
71
+ feedback_context=None,
72
  )
73
  # Add feedback_context if provided
74
  if "feedback_context" in kwargs: