langgraph-api 0.2.97__py3-none-any.whl → 0.2.98__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/logging.py +21 -1
- {langgraph_api-0.2.97.dist-info → langgraph_api-0.2.98.dist-info}/METADATA +1 -1
- {langgraph_api-0.2.97.dist-info → langgraph_api-0.2.98.dist-info}/RECORD +7 -7
- {langgraph_api-0.2.97.dist-info → langgraph_api-0.2.98.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.97.dist-info → langgraph_api-0.2.98.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.2.97.dist-info → langgraph_api-0.2.98.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.98"
|
langgraph_api/logging.py
CHANGED
|
@@ -68,11 +68,31 @@ class AddApiVersion:
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
class AddLoggingContext:
|
|
71
|
+
def __init__(self):
|
|
72
|
+
try:
|
|
73
|
+
from langchain_core.runnables.config import (
|
|
74
|
+
RunnableConfig,
|
|
75
|
+
var_child_runnable_config,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
self.cvar: contextvars.ContextVar[RunnableConfig | None] = (
|
|
79
|
+
var_child_runnable_config
|
|
80
|
+
)
|
|
81
|
+
except Exception:
|
|
82
|
+
self.cvar = False
|
|
83
|
+
|
|
71
84
|
def __call__(
|
|
72
85
|
self, logger: logging.Logger, method_name: str, event_dict: EventDict
|
|
73
86
|
) -> EventDict:
|
|
74
87
|
if (ctx := worker_config.get()) is not None:
|
|
75
88
|
event_dict.update(ctx)
|
|
89
|
+
if (
|
|
90
|
+
self.cvar is not None
|
|
91
|
+
and (conf := self.cvar.get())
|
|
92
|
+
and (metadata := conf.get("metadata"))
|
|
93
|
+
and (lgnode := metadata.get("langgraph_node"))
|
|
94
|
+
):
|
|
95
|
+
event_dict["langgraph_node"] = lgnode
|
|
76
96
|
return event_dict
|
|
77
97
|
|
|
78
98
|
|
|
@@ -128,6 +148,7 @@ class Formatter(structlog.stdlib.ProcessorFormatter):
|
|
|
128
148
|
super().__init__(
|
|
129
149
|
processors=[
|
|
130
150
|
structlog.stdlib.ProcessorFormatter.remove_processors_meta,
|
|
151
|
+
AddLoggingContext(),
|
|
131
152
|
renderer,
|
|
132
153
|
],
|
|
133
154
|
foreign_pre_chain=shared_processors,
|
|
@@ -136,7 +157,6 @@ class Formatter(structlog.stdlib.ProcessorFormatter):
|
|
|
136
157
|
|
|
137
158
|
|
|
138
159
|
# configure structlog
|
|
139
|
-
|
|
140
160
|
if not structlog.is_configured():
|
|
141
161
|
structlog.configure(
|
|
142
162
|
processors=[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=SZSk7mJkvklaLjMr4nqLhJATWHlSnR87dAGE8WoUVrk,23
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=eqifhHxNnxvI7jJqrY1_8RjL4Fp9NdN4prEub2FWBt8,5091
|
|
3
3
|
langgraph_api/asyncio.py,sha256=Wv4Rwm-a-Cf6JpfgJmVuVlXQ7SlwrjbTn0eq1ux8I2Q,9652
|
|
4
4
|
langgraph_api/cli.py,sha256=-R0fvxg4KNxTkSe7xvDZruF24UMhStJYjpAYlUx3PBk,16018
|
|
@@ -10,7 +10,7 @@ langgraph_api/feature_flags.py,sha256=ZoId5X1FpWGvHcKAduqDMRNEKks5Bt8Eswww_xoch5
|
|
|
10
10
|
langgraph_api/graph.py,sha256=Q9tRf1WBaxFBOgs_orlMAlBVJM0-cpZVduknU_fbzRM,24235
|
|
11
11
|
langgraph_api/http.py,sha256=L0leP5fH4NIiFgJd1YPMnTRWqrUUYq_4m5j558UwM5E,5612
|
|
12
12
|
langgraph_api/http_metrics.py,sha256=VgM45yU1FkXuI9CIOE_astxAAu2G-OJ42BRbkcos_CQ,5555
|
|
13
|
-
langgraph_api/logging.py,sha256=
|
|
13
|
+
langgraph_api/logging.py,sha256=4K1Fnq8rrGC9CqJubZtP34Y9P2zh7VXf_41q7bH3OXU,4849
|
|
14
14
|
langgraph_api/metadata.py,sha256=lfovneEMLA5vTNa61weMkQkiZCtwo-qdwFwqNSj5qVs,6638
|
|
15
15
|
langgraph_api/patch.py,sha256=Dgs0PXHytekX4SUL6KsjjN0hHcOtGLvv1GRGbh6PswU,1408
|
|
16
16
|
langgraph_api/queue_entrypoint.py,sha256=hC8j-A4cUxibusiiPJBlK0mkmChNZxNcXn5GVwL0yic,4889
|
|
@@ -94,8 +94,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
|
|
|
94
94
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
95
95
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
96
96
|
openapi.json,sha256=p5tn_cNRiFA0HN3L6JfC9Nm16Hgv-BxvAQcJymKhVWI,143296
|
|
97
|
-
langgraph_api-0.2.
|
|
98
|
-
langgraph_api-0.2.
|
|
99
|
-
langgraph_api-0.2.
|
|
100
|
-
langgraph_api-0.2.
|
|
101
|
-
langgraph_api-0.2.
|
|
97
|
+
langgraph_api-0.2.98.dist-info/METADATA,sha256=f0zTw-SE99YhdobRyKgWNLbb258h6mJS2y9HXslnByE,3891
|
|
98
|
+
langgraph_api-0.2.98.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
99
|
+
langgraph_api-0.2.98.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
100
|
+
langgraph_api-0.2.98.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
101
|
+
langgraph_api-0.2.98.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|