GitHub

ToolResultPart

API reference for ToolResultPart.

A tool's result (encoded) for the call id. model_output, when set, is sent to the model in place of result.

Attributes

AttributeTypeDescription
typeLiteral['tool-result'] = 'tool-result'
idstr
namestr
is_failurebool
resultobject
provider_executedbool = False
optionsProviderOptions = field(default_factory=_options)
model_outputtuple[ToolModelOutputPart, ...] | None = None

Functions

__init__

__init__(id, name, is_failure, result, provider_executed=False, options=_options(), model_output=None) -> None
ParameterTypeDescription
idstr
namestr
is_failurebool
resultobject
provider_executedbool = False
optionsProviderOptions = _options()
model_outputtuple[ToolModelOutputPart, ...] | None = None

pipe

pipe[B](f) -> B
ParameterTypeDescription
fCallable[[Self], B]

Returns B

def pipe[B](self, f: Callable[[Self], B], /) -> B:
    return f(self)