toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'model'] = this.model;
  if (this.prompt != null) {
    json[r'prompt'] = this.prompt;
  } else {
    json[r'prompt'] = null;
  }
  if (this.suffix != null) {
    json[r'suffix'] = this.suffix;
  } else {
    json[r'suffix'] = null;
  }
  if (this.maxTokens != null) {
    json[r'max_tokens'] = this.maxTokens;
  } else {
    json[r'max_tokens'] = null;
  }
  if (this.temperature != null) {
    json[r'temperature'] = this.temperature;
  } else {
    json[r'temperature'] = null;
  }
  if (this.topP != null) {
    json[r'top_p'] = this.topP;
  } else {
    json[r'top_p'] = null;
  }
  if (this.n != null) {
    json[r'n'] = this.n;
  } else {
    json[r'n'] = null;
  }
  if (this.stream != null) {
    json[r'stream'] = this.stream;
  } else {
    json[r'stream'] = null;
  }
  if (this.logprobs != null) {
    json[r'logprobs'] = this.logprobs;
  } else {
    json[r'logprobs'] = null;
  }
  if (this.echo != null) {
    json[r'echo'] = this.echo;
  } else {
    json[r'echo'] = null;
  }
  if (this.stop != null) {
    json[r'stop'] = this.stop;
  } else {
    json[r'stop'] = null;
  }
  if (this.presencePenalty != null) {
    json[r'presence_penalty'] = this.presencePenalty;
  } else {
    json[r'presence_penalty'] = null;
  }
  if (this.frequencyPenalty != null) {
    json[r'frequency_penalty'] = this.frequencyPenalty;
  } else {
    json[r'frequency_penalty'] = null;
  }
  if (this.bestOf != null) {
    json[r'best_of'] = this.bestOf;
  } else {
    json[r'best_of'] = null;
  }
  if (this.logitBias != null) {
    json[r'logit_bias'] = this.logitBias;
  } else {
    json[r'logit_bias'] = null;
  }
  if (this.user != null) {
    json[r'user'] = this.user;
  } else {
    json[r'user'] = null;
  }
  return json;
}