Files
RequestedFile
Section titled “RequestedFile”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.
| Field | Type |
|---|---|
name | str |
format | str | None |
description | str | None |
RequestedFile.__init__
Section titled “RequestedFile.__init__”__init__( name: str, format: str | None = None, description: str | None = None,) -> NoneFileSource
Section titled “FileSource”Where a file was produced.
| Field | Type |
|---|---|
tool | str |
round | int |
turn | int |
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.
| Field | Type |
|---|---|
id | str |
name | str |
format | str | None |
mime_type | str | None |
bytes | int |
source | FileSource |
text | str | None |
data_base64 | str | None |
preview | str | None |
File.is_text
Section titled “File.is_text”is_text() -> boolFile.is_binary
Section titled “File.is_binary”is_binary() -> boolFile.is_image
Section titled “File.is_image”is_image() -> boolFile.is_video
Section titled “File.is_video”is_video() -> boolFile.is_error
Section titled “File.is_error”is_error() -> boolFile.is_truncated
Section titled “File.is_truncated”is_truncated() -> boolFile.save
Section titled “File.save”save(path: str) -> NoneGenerated from mistralrs-pyo3/mistralrs.pyi.