response["raw_response"]
, it’s recommended to use the standardized response["prompt_blueprint"]
. This ensures consistency across different providers.
request_id
is only included in the final chunk, indicating the completion of the streaming response.
placeholder
role, you can define placeholders within your prompt template that can be replaced with full messages when the prompt is executed.
For more detailed information on Placeholder Messages, including how to create and use them, please refer to our dedicated Placeholder Messages Documentation page.
role
: The role of the message sender (user
, assistant
, etc.).content
: A list of content items, where each item has:
type
: The type of content (text
, thinking
, media
, etc.).text
: The text content (if type
is text
).thinking
: The thinking content (if type
is thinking
).signature
: The signature content (if type
is thinking
).tools
field. Each tool definition follows this structure:
parameters
field is of interest because it specifies the expected input parameters for the function. The LLM provider will use this information to generate the appropriate tool call. You can define the parameters
using JSON Schema format. You can read moe about how OpenAI uses JSON Schema for defining parameters here. And you can read more about how Anthropic uses JSON Schema for defining parameters here.
tool_calls
field in the message. The format is:
id
is used by the assistant to track the tool call.type
is always function
.function
contains the function details
name
tells us which function to callarguments
is a JSON string containing the function’s input parameters.media_variable
content allows you to dynamically insert a list of medias into prompt template messages.
The media_variable
is nested within the message content. The type
and name
are required fields specifying the type of content and the name of the variable, respectively. The name
is the name of the list of medias to be dynamically inserted.
media_variable
to dynamically include medias in your messages.
media
is a list of strings, they can either be public URLs or base64 strings.The schema is of type object
.