LangSmith Client.
Evaluate an async target system on a given dataset.
Evaluate existing experiment runs asynchronously.
Evaluate a target system on a given dataset.
Evaluate existing experiment runs.
Get the current run tree.
Uses a weakref-based lookup to avoid memory leaks from captured contexts. The RunTree may return None if it has been garbage collected.
Get the current tracing context.
Update metadata on the current run tree.
Trace a function with langsmith.
Set the tracing context for a block of code.
Configure global LangSmith tracing context.
This function allows you to set global configuration options for LangSmith tracing that will be applied to all subsequent traced operations. It modifies context variables that control tracing behavior across your application.
Do this once at startup to configure the global settings in code.
If, instead, you wish to only configure tracing for a single invocation,
use the tracing_context context manager instead.
Generate a random UUID v7.
Generate a UUID v7 from a datetime.
Async Client for interacting with the LangSmith API.
Client for interacting with the LangSmith API.
Evaluation result.
Evaluator interface class.
Thread-safe LRU cache with asyncio task refresh.
For use with the asynchronous AsyncClient.
Features:
Thread-safe LRU cache with background thread refresh.
For use with the synchronous Client.
Features:
Manage a LangSmith run in context.
This class can be used as both a synchronous and asynchronous context manager.
Run Schema with back-references for posting runs.
ThreadPoolExecutor that copies the context to the child thread.
Client for interacting with the LangSmith API.
Use the client to customize API keys / workspace connections, SSL certs, etc. for tracing.
Also used to create, read, update, and delete LangSmith resources such as runs (~trace spans), datasets, examples (~records), feedback (~metrics), projects (tracer sessions/groups), etc.
For detailed API documentation, visit the LangSmith docs.
Schemas for the LangSmith API.
The Async LangSmith Client.
Generic utility functions.
Public UUID v7 helpers.
These helpers expose utilities for generating UUID v7 identifiers in user code.
Schemas for the LangSmith API.
Decorator for creating a run tree from functions.
Middleware for making it easier to do distributed tracing.
Prompt caching module for LangSmith SDK.
This module provides thread-safe LRU caches with background refresh for prompt caching. Includes both sync and async implementations.
LangSmith Pytest hooks.
Evaluation Helpers.
Utilities to get information about the runtime environment.
This module provides convenient tracing wrappers for popular libraries.
LangSmith Sandbox Module.
This module provides sandboxed code execution capabilities through the LangSmith Sandbox API.
LangSmith pytest testing module.