AnswerApiParameters constructor
AnswerApiParameters(
- String model,
- String question,
- List<
List< examples,String> > - String examplesContext, {
- List<
String> ? documents, - String? file,
- String searchModel = 'ada',
- int maxRerank = 200,
- num temperature = 0,
- int? logprobs,
- int maxTokens = 16,
- List<
String> ? stop, - int n = 1,
- Map<
String, num> ? logitBias, - bool returnMetadata = false,
- bool returnPrompt = false,
- 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.');
}
}