chat method
Sends a chat request to the provider with a sequence of messages.
messages
- The conversation history as a list of chat messages
Returns the provider's response or throws an LLMError
Implementation
@override
Future<ChatResponse> chat(List<ChatMessage> messages) async {
// Use Responses API if enabled, otherwise use Chat Completions API
if (config.useResponsesAPI && _responses != null) {
return _responses.chat(messages);
} else {
return _chat.chat(messages);
}
}