ClassificationApiParameters constructor

ClassificationApiParameters(
  1. String model,
  2. String query, {
  3. List<List<String>>? examples,
  4. String? file,
  5. List<String>? labels,
  6. String searchModel = 'ada',
  7. num temperature = 0,
  8. int? logprobs,
  9. int maxExamples = 200,
  10. Map<String, num>? logitBias,
  11. bool returnPrompt = false,
  12. bool returnMetadata = false,
  13. List<String>? expand,
})

Implementation

ClassificationApiParameters(this.model, this.query,
    {this.examples,
    this.file,
    this.labels,
    this.searchModel = 'ada',
    this.temperature = 0,
    this.logprobs,
    this.maxExamples = 200,
    this.logitBias,
    this.returnPrompt = false,
    this.returnMetadata = false,
    this.expand}) {
  if (examples == null && file == null) {
    throw ArgumentError(
        'Either the examples argument or the file argument needs to be provided.');
  }
  if (examples != null && file != null) {
    throw ArgumentError(
        'You can only provide the examples or the file argument, but not both.');
  }
}