mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-10 07:21:03 +00:00
[Core] Add more interops tests (#26841)
To test that the client propagates both ways
This commit is contained in:
@@ -2333,7 +2333,11 @@ def _configure(
|
||||
try:
|
||||
handler = LangChainTracer(
|
||||
project_name=tracer_project,
|
||||
client=run_tree.client if run_tree is not None else None,
|
||||
client=(
|
||||
run_tree.client
|
||||
if run_tree is not None
|
||||
else tracing_context["client"]
|
||||
),
|
||||
)
|
||||
callback_manager.add_handler(handler, True)
|
||||
except Exception as e:
|
||||
|
@@ -118,7 +118,7 @@ class _TracerCore(ABC):
|
||||
self._add_child_run(parent_run, run)
|
||||
else:
|
||||
if self.log_missing_parent:
|
||||
logger.warning(
|
||||
logger.debug(
|
||||
f"Parent run {run.parent_run_id} not found for run {run.id}."
|
||||
" Treating as a root run."
|
||||
)
|
||||
|
@@ -123,7 +123,7 @@ class LangChainTracer(BaseTracer):
|
||||
|
||||
super()._start_trace(run)
|
||||
if run._client is None:
|
||||
run._client = self.client
|
||||
run._client = self.client # type: ignore
|
||||
|
||||
def on_chat_model_start(
|
||||
self,
|
||||
|
Reference in New Issue
Block a user