ChatController constructor
ChatController({
- ChatGptClient? client,
- String systemPrompt = '',
- String model = 'auto',
- bool? webSearch,
- void onLog(
- String line
Creates a controller.
Implementation
ChatController({
ChatGptClient? client,
String systemPrompt = '',
String model = 'auto',
bool? webSearch,
this.onLog,
}) : _client = client ?? ChatGptClient(),
_ownsClient = client == null,
_model = model,
_webSearch = webSearch {
_session = _client.newSession(systemPrompt: systemPrompt);
}