run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
void run() async {
final results = argResults!;
OpenAI.apiKey = Platform.environment['OPENAI_KEY'] ?? results['openai-key'];
await _brainstorm(
results.rest.join(' '),
model: results['model'],
limit: int.parse(results['limit']),
temperature: double.parse(results['temperature']),
frequencyPenalty: double.parse(results['frequency-penalty']),
);
}