chatWithAdvancedTools abstract method

Future<ChatResponse> chatWithAdvancedTools(
  1. List<ChatMessage> messages, {
  2. List<Tool>? tools,
  3. ToolChoice? toolChoice,
  4. StructuredOutputFormat? structuredOutput,
})

Sends a chat request with advanced tool and output configuration

messages - The conversation history as a list of chat messages tools - Optional list of tools to use in the chat toolChoice - Optional tool choice strategy (auto, required, specific, none) structuredOutput - Optional structured output format for typed responses

Returns the provider's response or throws an LLMError

Implementation

Future<ChatResponse> chatWithAdvancedTools(
  List<ChatMessage> messages, {
  List<Tool>? tools,
  ToolChoice? toolChoice,
  StructuredOutputFormat? structuredOutput,
});