AIChatWidget constructor
const
AIChatWidget({ - Key? key,
- required AIProvider provider,
- String? systemPrompt,
- AIChatTheme theme = const AIChatTheme(),
- String hintText = 'Type a message...',
- Widget messageBuilder(
- AIMessage message,
- bool isStreaming
)?,
- void onResponse(
- AIResponse response
)?,
- void onError(
- AIError error
)?,
- int maxContextTokens = 4096,
- ConversationManager? conversationManager,
- Conversation? activeConversation,
- 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,
});