[ Edit ] test file modifications
This commit is contained in:
@ -6,7 +6,7 @@ void main() async {
|
||||
OpenAI.apiKey = Env.apiKey;
|
||||
|
||||
final chatStream = OpenAI.instance.chat.createStream(
|
||||
model: "gpt-3.5-turbo",
|
||||
model: "gpt-3.5-turbfqfqo",
|
||||
messages: [
|
||||
OpenAIChatCompletionChoiceMessageModel(
|
||||
content: [
|
||||
@ -35,7 +35,15 @@ void main() async {
|
||||
],
|
||||
);
|
||||
|
||||
chatStream.listen((event) {
|
||||
print(event.choices.first.delta.content);
|
||||
});
|
||||
chatStream.listen(
|
||||
(event) {
|
||||
print(event.choices.first.delta.content);
|
||||
},
|
||||
onError: (e) {
|
||||
print("Error, $e");
|
||||
},
|
||||
onDone: () {
|
||||
print("Done");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -329,8 +329,6 @@ void main() async {
|
||||
);
|
||||
|
||||
test('create with a stream', () async {
|
||||
OpenAI.apiKey = "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";
|
||||
|
||||
final chatStream = OpenAI.instance.chat.createStream(
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [
|
||||
|
Reference in New Issue
Block a user