run_trees#

Schemas for the LangSmith API.

Classes

run_trees.RunTree

Run Schema with back-references for posting runs.

Functions

run_trees.RunTree.add_event(events)

Add an event to the list of events.

run_trees.RunTree.add_metadata(metadata)

Add metadata to the run.

run_trees.RunTree.add_outputs(outputs)

Upsert the given outputs into the run.

run_trees.RunTree.add_tags(tags)

Add tags to the run.

run_trees.RunTree.create_child(name[, ...])

Add a child run to the run tree.

run_trees.RunTree.end(*[, outputs, error, ...])

Set the end time of the run and all child runs.

run_trees.RunTree.get_url()

Return the URL of the run.

run_trees.RunTree.patch()

Patch the run tree to the API in a background thread.

run_trees.RunTree.post([exclude_child_runs])

Post the run tree to the API asynchronously.

run_trees.RunTree.to_headers()

Return the RunTree as a dictionary of headers.

run_trees.RunTree.wait()

Wait for all _futures to complete.

run_trees.get_cached_client(**init_kwargs)