OpenAIStreamCompletionModelChoice.fromMap constructor
This class is used to represent a choice generated by an OpenAI stream completion. This method is used to convert a Map<String, dynamic> object to a OpenAIStreamCompletionModelChoice object.
Implementation
factory OpenAIStreamCompletionModelChoice.fromMap(
Map<String, dynamic> json,
) {
return OpenAIStreamCompletionModelChoice(
text: json['text'],
index: json['index'],
logprobs: json['logprobs'],
finishReason: json['finishReason'],
);
}