langgraph-api 0.2.34__py3-none-any.whl → 0.2.36__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.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/api/meta.py +2 -2
- langgraph_api/graph.py +7 -7
- langgraph_api/store.py +4 -2
- {langgraph_api-0.2.34.dist-info → langgraph_api-0.2.36.dist-info}/METADATA +1 -1
- {langgraph_api-0.2.34.dist-info → langgraph_api-0.2.36.dist-info}/RECORD +9 -9
- {langgraph_api-0.2.34.dist-info → langgraph_api-0.2.36.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.34.dist-info → langgraph_api-0.2.36.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.2.34.dist-info → langgraph_api-0.2.36.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.36"
|
langgraph_api/api/meta.py
CHANGED
|
@@ -54,10 +54,10 @@ async def meta_metrics(request: ApiRequest):
|
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
elif format == "prometheus":
|
|
57
|
-
# LANGSMITH_HOST_PROJECT_ID and
|
|
57
|
+
# LANGSMITH_HOST_PROJECT_ID and LANGSMITH_HOST_REVISION_ID are injected
|
|
58
58
|
# into the deployed image by host-backend.
|
|
59
59
|
project_id = os.getenv("LANGSMITH_HOST_PROJECT_ID")
|
|
60
|
-
revision_id = os.getenv("
|
|
60
|
+
revision_id = os.getenv("LANGSMITH_HOST_REVISION_ID")
|
|
61
61
|
|
|
62
62
|
metrics = [
|
|
63
63
|
"# HELP lg_api_workers_max The maximum number of workers available.",
|
langgraph_api/graph.py
CHANGED
|
@@ -18,7 +18,7 @@ import structlog
|
|
|
18
18
|
from langchain_core.runnables.config import run_in_executor, var_child_runnable_config
|
|
19
19
|
from langgraph.checkpoint.base import BaseCheckpointSaver
|
|
20
20
|
from langgraph.constants import CONFIG_KEY_CHECKPOINTER, CONFIG_KEY_STORE
|
|
21
|
-
from langgraph.graph import
|
|
21
|
+
from langgraph.graph import StateGraph
|
|
22
22
|
from langgraph.pregel import Pregel
|
|
23
23
|
from langgraph.store.base import BaseStore
|
|
24
24
|
from langgraph.utils.config import ensure_config
|
|
@@ -34,8 +34,8 @@ if TYPE_CHECKING:
|
|
|
34
34
|
|
|
35
35
|
logger = structlog.stdlib.get_logger(__name__)
|
|
36
36
|
|
|
37
|
-
GraphFactoryFromConfig = Callable[[Config], Pregel |
|
|
38
|
-
GraphFactory = Callable[[], Pregel |
|
|
37
|
+
GraphFactoryFromConfig = Callable[[Config], Pregel | StateGraph]
|
|
38
|
+
GraphFactory = Callable[[], Pregel | StateGraph]
|
|
39
39
|
GraphValue = Pregel | GraphFactory
|
|
40
40
|
|
|
41
41
|
|
|
@@ -130,7 +130,7 @@ async def get_graph(
|
|
|
130
130
|
value = value(config) if FACTORY_ACCEPTS_CONFIG[graph_id] else value()
|
|
131
131
|
try:
|
|
132
132
|
async with _generate_graph(value) as graph_obj:
|
|
133
|
-
if isinstance(graph_obj,
|
|
133
|
+
if isinstance(graph_obj, StateGraph):
|
|
134
134
|
graph_obj = graph_obj.compile()
|
|
135
135
|
if not isinstance(graph_obj, Pregel | BaseRemotePregel):
|
|
136
136
|
raise HTTPException(
|
|
@@ -442,7 +442,7 @@ def _graph_from_spec(spec: GraphSpec) -> GraphValue:
|
|
|
442
442
|
likely = [
|
|
443
443
|
k
|
|
444
444
|
for k in available
|
|
445
|
-
if isinstance(module.__dict__[k],
|
|
445
|
+
if isinstance(module.__dict__[k], StateGraph | Pregel)
|
|
446
446
|
]
|
|
447
447
|
if likely:
|
|
448
448
|
prefix = spec.module or spec.path
|
|
@@ -471,7 +471,7 @@ def _graph_from_spec(spec: GraphSpec) -> GraphValue:
|
|
|
471
471
|
raise ValueError(
|
|
472
472
|
f"Graph factory function '{spec.variable}' in module '{spec.path}' must take exactly one argument, a RunnableConfig"
|
|
473
473
|
)
|
|
474
|
-
elif isinstance(graph,
|
|
474
|
+
elif isinstance(graph, StateGraph):
|
|
475
475
|
graph = graph.compile()
|
|
476
476
|
elif isinstance(graph, Pregel):
|
|
477
477
|
# We don't want to fail real deployments, but this will help folks catch unnecessary custom components
|
|
@@ -513,7 +513,7 @@ def _graph_from_spec(spec: GraphSpec) -> GraphValue:
|
|
|
513
513
|
break
|
|
514
514
|
else:
|
|
515
515
|
for _, member in inspect.getmembers(module):
|
|
516
|
-
if isinstance(member,
|
|
516
|
+
if isinstance(member, StateGraph):
|
|
517
517
|
graph = member.compile()
|
|
518
518
|
break
|
|
519
519
|
else:
|
langgraph_api/store.py
CHANGED
|
@@ -9,7 +9,7 @@ from typing import Any
|
|
|
9
9
|
|
|
10
10
|
import structlog
|
|
11
11
|
from langchain_core.runnables.config import run_in_executor
|
|
12
|
-
from langgraph.graph import
|
|
12
|
+
from langgraph.graph import StateGraph
|
|
13
13
|
from langgraph.pregel import Pregel
|
|
14
14
|
from langgraph.store.base import BaseStore
|
|
15
15
|
|
|
@@ -108,7 +108,9 @@ def _load_store(store_path: str) -> Any:
|
|
|
108
108
|
suggestion = ""
|
|
109
109
|
if available:
|
|
110
110
|
likely = [
|
|
111
|
-
k
|
|
111
|
+
k
|
|
112
|
+
for k in available
|
|
113
|
+
if isinstance(module.__dict__[k], StateGraph | Pregel)
|
|
112
114
|
]
|
|
113
115
|
if likely:
|
|
114
116
|
likely_ = "\n".join(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=2SCWKVJsfcScnIqc9fmnmX_CckRKWSBl3JHvpBi3xow,23
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=eqifhHxNnxvI7jJqrY1_8RjL4Fp9NdN4prEub2FWBt8,5091
|
|
3
3
|
langgraph_api/asyncio.py,sha256=nelZwKL7iOjM5GHj1rVjiPE7igUIKLNKtc-3urxmlfo,9250
|
|
4
4
|
langgraph_api/cli.py,sha256=9Ou3tGDDY_VVLt5DFle8UviJdpI4ZigC5hElYvq2-To,14519
|
|
@@ -6,7 +6,7 @@ langgraph_api/command.py,sha256=3O9v3i0OPa96ARyJ_oJbLXkfO8rPgDhLCswgO9koTFA,768
|
|
|
6
6
|
langgraph_api/config.py,sha256=j1e1D9h1cTny3Q_8N3Tbbvq179rEjzPGjMKJnS6yFNE,10982
|
|
7
7
|
langgraph_api/cron_scheduler.py,sha256=i87j4pJrcsmsqMKeKUs69gaAjrGaSM3pM3jnXdN5JDQ,2630
|
|
8
8
|
langgraph_api/errors.py,sha256=Bu_i5drgNTyJcLiyrwVE_6-XrSU50BHf9TDpttki9wQ,1690
|
|
9
|
-
langgraph_api/graph.py,sha256=
|
|
9
|
+
langgraph_api/graph.py,sha256=MPm8DvInBQsq2em45c2YD5bW6T_G1LlDkAuWq-19gCQ,23240
|
|
10
10
|
langgraph_api/http.py,sha256=gYbxxjY8aLnsXeJymcJ7G7Nj_yToOGpPYQqmZ1_ggfA,5240
|
|
11
11
|
langgraph_api/logging.py,sha256=3GSbvmXi8yWxWxJ558RE81xUEdklrPHJ4PpkxAb-35w,4428
|
|
12
12
|
langgraph_api/metadata.py,sha256=ptaxwmzdx2bUBSc1KRhqgF-Xnm-Zh2gqwSiHpl8LD9c,4482
|
|
@@ -18,7 +18,7 @@ langgraph_api/serde.py,sha256=8fQXg7T7RVUqj_jgOoSOJrWVpQDW0qJKjAjSsEhPHo4,4803
|
|
|
18
18
|
langgraph_api/server.py,sha256=Z_VL-kIphybTRDWBIqHMfRhgCmAFyTRqAGlgnHQF0Zg,6973
|
|
19
19
|
langgraph_api/sse.py,sha256=F7swfjKBDrlUmXZ_dWuDVHtp-3o1Cpjq1lwp0bJD-nw,4223
|
|
20
20
|
langgraph_api/state.py,sha256=8jx4IoTCOjTJuwzuXJKKFwo1VseHjNnw_CCq4x1SW14,2284
|
|
21
|
-
langgraph_api/store.py,sha256=
|
|
21
|
+
langgraph_api/store.py,sha256=_xGhdwEIMoY1_hIy_oWwxZp4Y7FH833BNJfgFIhT80E,4640
|
|
22
22
|
langgraph_api/stream.py,sha256=T1tkUZFr5KlgqvE-QHEh-m80mWAgp2MUT9gFD7HLen0,12670
|
|
23
23
|
langgraph_api/thread_ttl.py,sha256=-Ox8NFHqUH3wGNdEKMIfAXUubY5WGifIgCaJ7npqLgw,1762
|
|
24
24
|
langgraph_api/utils.py,sha256=92mSti9GfGdMRRWyESKQW5yV-75Z9icGHnIrBYvdypU,3619
|
|
@@ -28,7 +28,7 @@ langgraph_api/worker.py,sha256=yngRvZAKePFAGD0Xb3wtUYfEIcZS1D_ewA2tZJxmXys,12485
|
|
|
28
28
|
langgraph_api/api/__init__.py,sha256=YVzpbn5IQotvuuLG9fhS9QMrxXfP4s4EpEMG0n4q3Nw,5625
|
|
29
29
|
langgraph_api/api/assistants.py,sha256=x_V1rnSGFYjNZFJkZKFN9yNFOqXhqkOSqMDSv3I8VeE,15880
|
|
30
30
|
langgraph_api/api/mcp.py,sha256=RvRYgANqRzNQzSmgjNkq4RlKTtoEJYil04ot9lsmEtE,14352
|
|
31
|
-
langgraph_api/api/meta.py,sha256=
|
|
31
|
+
langgraph_api/api/meta.py,sha256=S6vj9lvVlZhRYDyefFtJMlqYTPxfYGC5EQKD5hx8Kp8,2946
|
|
32
32
|
langgraph_api/api/openapi.py,sha256=362m6Ny8wOwZ6HrDK9JAVUzPkyLYWKeV1E71hPOaA0U,11278
|
|
33
33
|
langgraph_api/api/runs.py,sha256=CGPNYM8jjwQybVsaKC5ubhABQUpytHAxX5wWA4QJ9Tk,18669
|
|
34
34
|
langgraph_api/api/store.py,sha256=TSeMiuMfrifmEnEbL0aObC2DPeseLlmZvAMaMzPgG3Y,5535
|
|
@@ -78,8 +78,8 @@ langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA
|
|
|
78
78
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
79
79
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
80
80
|
openapi.json,sha256=_4GFDqbq1X9vD4_FxwahuVODJMOHx-U76gkY4rdy3DA,138189
|
|
81
|
-
langgraph_api-0.2.
|
|
82
|
-
langgraph_api-0.2.
|
|
83
|
-
langgraph_api-0.2.
|
|
84
|
-
langgraph_api-0.2.
|
|
85
|
-
langgraph_api-0.2.
|
|
81
|
+
langgraph_api-0.2.36.dist-info/METADATA,sha256=d78V1_kAWD9mRIwVWsf3w1FWKP0CflO0LKS1VHGTzS8,3892
|
|
82
|
+
langgraph_api-0.2.36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
83
|
+
langgraph_api-0.2.36.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
84
|
+
langgraph_api-0.2.36.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
85
|
+
langgraph_api-0.2.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|