AiChatMessage.assistantWithToolCalls constructor

AiChatMessage.assistantWithToolCalls(
  1. List<AiToolCallRequest> toolCalls, {
  2. String content = '',
})

An assistant message that invokes tools (OpenAI protocol shape). content carries any text the model produced alongside the calls.

Implementation

factory AiChatMessage.assistantWithToolCalls(
  List<AiToolCallRequest> toolCalls, {
  String content = '',
}) => AiChatMessage(
  role: AiRole.assistant,
  content: content,
  toolCalls: toolCalls,
);