hyperpocket-langgraph 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
1
  import copy
2
+ import json
2
3
  from typing import Optional
3
4
 
4
- from hyperpocket.config import pocket_logger
5
5
  from langchain_core.runnables import RunnableConfig
6
6
  from langgraph.errors import NodeInterrupt
7
- from pydantic import BaseModel
7
+
8
+ from hyperpocket.config import pocket_logger
8
9
 
9
10
  try:
10
11
  from langchain_core.messages import ToolMessage
@@ -66,9 +67,6 @@ class PocketLanggraph(Pocket):
66
67
  body = tool_args
67
68
  profile = "default"
68
69
 
69
- if isinstance(body, BaseModel):
70
- body = body.model_dump()
71
-
72
70
  prepare = await self.prepare_in_subprocess(
73
71
  tool_name, body=body, thread_id=thread_id, profile=profile
74
72
  )
@@ -122,8 +120,8 @@ class PocketLanggraph(Pocket):
122
120
  body = tool_args
123
121
  profile = "default"
124
122
 
125
- if isinstance(body, BaseModel):
126
- body = body.model_dump()
123
+ if isinstance(body, str):
124
+ body = json.loads(body)
127
125
 
128
126
  try:
129
127
  auth = await self.authenticate_in_subprocess(
@@ -185,8 +183,8 @@ class PocketLanggraph(Pocket):
185
183
  thread_id = "default"
186
184
  profile = "default"
187
185
 
188
- if isinstance(body, BaseModel):
189
- body = body.model_dump()
186
+ if isinstance(body, str):
187
+ body = json.loads(body)
190
188
 
191
189
  result, interrupted = self.invoke_with_state(
192
190
  pocket_tool.name, body, thread_id, profile, **kwargs
@@ -206,8 +204,8 @@ class PocketLanggraph(Pocket):
206
204
  thread_id = "default"
207
205
  profile = "default"
208
206
 
209
- if isinstance(body, BaseModel):
210
- body = body.model_dump()
207
+ if isinstance(body, str):
208
+ body = json.loads(body)
211
209
 
212
210
  result, interrupted = await self.ainvoke_with_state(
213
211
  pocket_tool.name, body, thread_id, profile, **kwargs
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperpocket-langgraph
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Author-email: Hyperpocket Team <hyperpocket@vessl.ai>
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: hyperpocket>=0.0.3
7
- Requires-Dist: langgraph>=0.2.59
7
+ Requires-Dist: langgraph>=0.2.0
8
8
  Description-Content-Type: text/markdown
9
9
 
10
10
  # Langgraph extensions
@@ -0,0 +1,5 @@
1
+ hyperpocket_langgraph/__init__.py,sha256=Zqzel_ezEkzYOwVuzYWTQr4SJ737dd9hALXrIpMywEo,98
2
+ hyperpocket_langgraph/pocket_langgraph.py,sha256=kibZrXl5SCAYGkgjZbh9yTIhECKpKcZ2LyYvi4H2RzU,8260
3
+ hyperpocket_langgraph-0.3.7.dist-info/METADATA,sha256=zDZ6ubEtCY6Fow3UKtLGAcR6yhLFPD00rnNmCSP4OVo,5408
4
+ hyperpocket_langgraph-0.3.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ hyperpocket_langgraph-0.3.7.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- hyperpocket_langgraph/__init__.py,sha256=Zqzel_ezEkzYOwVuzYWTQr4SJ737dd9hALXrIpMywEo,98
2
- hyperpocket_langgraph/pocket_langgraph.py,sha256=Y1kj27T0NR7PFsO9NwQsZxBK9In-yQkwXTp_yDlPv80,8393
3
- hyperpocket_langgraph-0.3.5.dist-info/METADATA,sha256=mWrRmRuPWCRLph6zfYtzqPownEeyFsADi0uQdZKbDK0,5409
4
- hyperpocket_langgraph-0.3.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- hyperpocket_langgraph-0.3.5.dist-info/RECORD,,