Trace a function with langsmith.
Requires that LANGSMITH_TRACING_V2 be set to 'true' in the environment.
| Name | Type | Description |
|---|---|---|
run_type* | unknown | The type of run (span) to create. Examples: Defaults to "chain". |
name* | unknown | The name of the run. Defaults to the function name. |
metadata* | unknown | The metadata to add to the run. Defaults to |
tags* | unknown | The tags to add to the run. Defaults to |
client* | unknown | The client to use for logging the run to LangSmith. Defaults to
|
reduce_fn* | unknown | A function to reduce the output of the function if the function returns a generator. Defaults to Note If the iterator is never exhausted (e.g. the function returns an infinite generator), this will never be called, and the run itself will be stuck in a pending state. |
project_name* | unknown | The name of the project to log the run to. Defaults to |
process_inputs* | unknown | Custom serialization / processing function for inputs. Defaults to |
process_outputs* | unknown | Custom serialization / processing function for outputs. Defaults to |
dangerously_allow_filesystem* | unknown | Whether to allow filesystem access for attachments. Defaults to Traces that reference local filepaths will be uploaded to LangSmith. In general, network-hosted applications should not be using this because referenced files are usually on the user's machine, not the host machine. |
enabled* | unknown | Whether tracing is enabled for this function. Defaults to |
exceptions_to_handle* | unknown | Exception types to ignore when logging errors. If an exception of one of these types is raised, the run will still be recorded
but the error field will be Defaults to |