AnswerApiParameters constructor

AnswerApiParameters(
  1. String model,
  2. String question,
  3. List<List<String>> examples,
  4. String examplesContext, {
  5. List<String>? documents,
  6. String? file,
  7. String searchModel = 'ada',
  8. int maxRerank = 200,
  9. num temperature = 0,
  10. int? logprobs,
  11. int maxTokens = 16,
  12. List<String>? stop,
  13. int n = 1,
  14. Map<String, num>? logitBias,
  15. bool returnMetadata = false,
  16. bool returnPrompt = false,
  17. List<String>? expand,
})

Implementation

AnswerApiParameters(
    this.model, this.question, this.examples, this.examplesContext,
    {this.documents,
    this.file,
    this.searchModel = 'ada',
    this.maxRerank = 200,
    this.temperature = 0,
    this.logprobs,
    this.maxTokens = 16,
    this.stop,
    this.n = 1,
    this.logitBias,
    this.returnMetadata = false,
    this.returnPrompt = false,
    this.expand}) {
  if (documents == null && file == null) {
    throw ArgumentError(
        'Either the documents argument or the file argument needs to be provided.');
  }
  if (documents != null && file != null) {
    throw ArgumentError(
        'You can only provide the documents or the file argument, but not both.');
  }
}