AIChatWidget constructor

const AIChatWidget({
  1. Key? key,
  2. required AIProvider provider,
  3. String? systemPrompt,
  4. AIChatTheme theme = const AIChatTheme(),
  5. String hintText = 'Type a message...',
  6. Widget messageBuilder(
    1. AIMessage message,
    2. bool isStreaming
    )?,
  7. void onResponse(
    1. AIResponse response
    )?,
  8. void onError(
    1. AIError error
    )?,
  9. int maxContextTokens = 4096,
  10. ConversationManager? conversationManager,
  11. Conversation? activeConversation,
  12. List<AITool>? tools,
})

Implementation

const AIChatWidget({
  super.key,
  required this.provider,
  this.systemPrompt,
  this.theme = const AIChatTheme(),
  this.hintText = 'Type a message...',
  this.messageBuilder,
  this.onResponse,
  this.onError,
  this.maxContextTokens = 4096,
  this.conversationManager,
  this.activeConversation,
  this.tools,
});