mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-29 03:09:45 +02:00
feat: support custom tracer when creating run in ts sdk
This commit is contained in:
@@ -979,6 +979,7 @@ export class RunsClient<
|
||||
after_seconds: payload?.afterSeconds,
|
||||
if_not_exists: payload?.ifNotExists,
|
||||
checkpoint_during: payload?.checkpointDuring,
|
||||
langsmith_tracer: payload?._langsmithTracer,
|
||||
};
|
||||
|
||||
const [run, response] = await this.fetch<Run>(`/threads/${threadId}/runs`, {
|
||||
@@ -1059,6 +1060,7 @@ export class RunsClient<
|
||||
after_seconds: payload?.afterSeconds,
|
||||
if_not_exists: payload?.ifNotExists,
|
||||
checkpoint_during: payload?.checkpointDuring,
|
||||
langsmith_tracer: payload?._langsmithTracer,
|
||||
};
|
||||
const endpoint =
|
||||
threadId == null ? `/runs/wait` : `/threads/${threadId}/runs/wait`;
|
||||
|
||||
@@ -140,6 +140,15 @@ interface RunsInvokePayload {
|
||||
* Callback when a run is created.
|
||||
*/
|
||||
onRunCreated?: (params: { run_id: string; thread_id?: string }) => void;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* For LangSmith tracing purposes only. Not part of the public API.
|
||||
*/
|
||||
_langsmithTracer?: {
|
||||
project_name: string;
|
||||
example_id: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface RunsStreamPayload<
|
||||
|
||||
Reference in New Issue
Block a user