send method
Sends a message in a conversation and returns the response.
Implementation
Future<AIResponse> send(
String conversationId,
String message, {
List<AITool>? tools,
}) async {
final conversation = _conversations[conversationId];
if (conversation == null) {
throw StateError('Conversation $conversationId not found');
}
// Add user message
conversation.addMessage(AIMessage.user(message));
storage?.saveConversation(conversation);
return _processConversation(conversation, tools);
}