chat method
Sends a chat request to the provider with a sequence of messages.
messages
- The conversation history as a list of chat messages
cancelToken
- Optional token to cancel the request
Returns the provider's response or throws an LLMError
Implementation
Future<ChatResponse> chat(
List<ChatMessage> messages, {
CancelToken? cancelToken,
}) async {
return chatWithTools(messages, null, cancelToken: cancelToken);
}