mirascope.llm.call_response | Mirascope
MirascopeLilypad

mirascope.llm.call_response

The CallResponse class for the LLM provider.

Class CallResponse

A provider-agnostic CallResponse class.

We rely on _response having common_ methods or properties for normalization.

Bases:

BaseCallResponse[Any, BaseTool, Any, BaseDynamicConfig[Any, Any, Any], BaseMessageParam, BaseCallParams, BaseMessageParam, BaseMessageParamConverter]

Attributes

NameTypeDescription
finish_reasonslist[FinishReason] | None-
usageUsage | NoneReturns the usage of the chat completion.
message_paramBaseMessageParam-
common_messageslist[BaseMessageParam]-
toolslist[Tool] | None-
toolTool | None-

Function tool_message_params

Returns the tool message parameters for tool call results.

Parameters

NameTypeDescription
clsAny-
tools_and_outputsSequence[tuple[BaseTool, str]]The sequence of tools and their outputs from which the tool message parameters should be constructed.

Returns

TypeDescription
list[BaseMessageParam]-