ChatController constructor

ChatController({
  1. ChatGptClient? client,
  2. String systemPrompt = '',
  3. String model = 'auto',
  4. bool? webSearch,
  5. void onLog(
    1. 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);
}