[ Edit ] test file modifications

This commit is contained in:
Anas Fikhi
2024-02-21 23:50:57 +01:00
parent 7c4712a93a
commit 23cb63ab2b
2 changed files with 12 additions and 6 deletions

View File

@ -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");
},
);
}

View File

@ -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: [