Gaykar commited on
Commit
ec9cdad
·
1 Parent(s): e870dd4
Files changed (1) hide show
  1. app/tools/context_agent_tools.py +3 -2
app/tools/context_agent_tools.py CHANGED
@@ -1,7 +1,7 @@
1
  from typing import Any
2
  from langmem import create_search_memory_tool
3
  from langchain.tools import tool
4
- from typing import Dict, Any
5
  from langchain.tools import tool
6
  from langgraph.prebuilt import InjectedState
7
  from langgraph.store.base import BaseStore
@@ -11,7 +11,8 @@ def search_memory_tool(
11
  query: str,
12
  limit: int = 3,
13
  # 1. Inject the entire Graph state at runtime
14
- state: Dict[str, Any] = InjectedState,
 
15
  # 2. Inject the compiled graph storage layer
16
  store: BaseStore = InjectedState("store")
17
  ) -> str:
 
1
  from typing import Any
2
  from langmem import create_search_memory_tool
3
  from langchain.tools import tool
4
+ from typing import Dict, Any, Optional,Annotated
5
  from langchain.tools import tool
6
  from langgraph.prebuilt import InjectedState
7
  from langgraph.store.base import BaseStore
 
11
  query: str,
12
  limit: int = 3,
13
  # 1. Inject the entire Graph state at runtime
14
+ state: Annotated[Dict[str, Any], InjectedState] = InjectedState,
15
+
16
  # 2. Inject the compiled graph storage layer
17
  store: BaseStore = InjectedState("store")
18
  ) -> str: