RunBase#
- class langsmith.schemas.RunBase[source]#
Bases:
BaseModel
Base Run schema.
A Run is a span representing a single unit of work or operation within your LLM app. This could be a single call to an LLM or chain, to a prompt formatting call, to a runnable lambda invocation. If you are familiar with OpenTelemetry, you can think of a run as a span.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param attachments: Dict[str, Tuple[str, bytes] | Attachment] [Optional]#
Attachments associated with the run. Each entry is a tuple of (mime_type, bytes).
- param end_time: datetime | None = None#
End time of the run, if applicable.
- param error: str | None = None#
Error message, if the run encountered any issues.
- param events: List[Dict] | None = None#
List of events associated with the run, like start and end events.
- param extra: dict | None [Optional]#
Additional metadata or settings related to the run.
- param id: UUID [Required]#
Unique identifier for the run.
- param inputs: dict [Optional]#
Inputs used for the run.
- param name: str [Required]#
Human-readable name for the run.
- param outputs: dict | None = None#
Outputs generated by the run, if any.
- param parent_run_id: UUID | None = None#
Identifier for a parent run, if this run is a sub-run.
- param reference_example_id: UUID | None = None#
Reference to an example that this run may be based on.
- param run_type: str [Required]#
The type of run, such as tool, chain, llm, retriever, embedding, prompt, parser.
- param serialized: dict | None = None#
Serialized object that executed the run for potential reuse.
- param start_time: datetime [Required]#
Start time of the run.
- param tags: List[str] | None = None#
Tags for categorizing or annotating the run.
- property metadata: dict[str, Any]#
Retrieve the metadata (if any).
- property revision_id: UUID | None#
Retrieve the revision ID (if any).