completeWithParams method

Future<CompletionResponse> completeWithParams({
  1. required String prompt,
  2. String? model,
  3. int? maxTokens,
  4. double? temperature,
  5. double? topP,
  6. List<String>? stop,
  7. double? presencePenalty,
  8. double? frequencyPenalty,
  9. String? suffix,
  10. bool echo = false,
})

Complete with custom parameters

Implementation

Future<CompletionResponse> completeWithParams({
  required String prompt,
  String? model,
  int? maxTokens,
  double? temperature,
  double? topP,
  List<String>? stop,
  double? presencePenalty,
  double? frequencyPenalty,
  String? suffix,
  bool echo = false,
}) async {
  final request = CompletionRequest(
    prompt: prompt,
    maxTokens: maxTokens,
    temperature: temperature,
    topP: topP,
    stop: stop,
  );

  return await complete(request);
}