Describe an agent message for task adherence
Source:R/content-safety-preview.R
foundry_agent_message.RdBuild a single conversation turn for the messages argument of
foundry_task_adherence().
Usage
foundry_agent_message(
source,
role,
contents = NULL,
tool_calls = NULL,
tool_call_id = NULL
)Arguments
- source
Character.
"Prompt"for the original user request or"Completion"for anything the agent produced.- role
Character.
"User","Assistant", or"Tool".- contents
Character. Optional message text.
- tool_calls
List. Optional tool calls issued by an assistant turn. Build each with
foundry_agent_tool_call().- tool_call_id
Character. Optional identifier tying a
Toolturn back to the tool call it answers.