Skip to content

Files

A required output file declared on a request. The runtime tells the model about declared files; if produced by a tool, they surface in ChatCompletionResponse.files. If missing, an error placeholder is surfaced instead.

FieldType
namestr
formatstr | None
descriptionstr | None
__init__(
name: str,
format: str | None = None,
description: str | None = None,
) -> None

Where a file was produced.

FieldType
toolstr
roundint
turnint

First-class output from an agentic run.

Files exist independently of the transcript. The body is inline for small files (text for text content, data_base64 for binary). Large files have a server-side url and text/data_base64 will be None - use is_truncated() to detect.

FieldType
idstr
namestr
formatstr | None
mime_typestr | None
bytesint
sourceFileSource
textstr | None
data_base64str | None
previewstr | None
is_text() -> bool
is_binary() -> bool
is_image() -> bool
is_video() -> bool
is_error() -> bool
is_truncated() -> bool
save(path: str) -> None

Generated from mistralrs-pyo3/mistralrs.pyi.