Skip to content

Commit d60f4dd

Browse files
committed
[ Fix ] fixed analyser type issue, edited documentation
1 parent e7c36cc commit d60f4dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ OpenAIChatCompletionModel chatCompletion = await OpenAI.instance.chat.create(
227227
in addition to calling `OpenAI.instance.chat.create()` which is a `Future` and will resolve only after the whole chat is generated, you can get a `Stream` of results:
228228

229229
```dart
230-
OpenAIStreamChatCompletionModel chatStream = OpenAI.instance.chat.createStream(
230+
OpenAIStreamChatCompletionModel chatStream = OpenAI.instance.chat.createStream(
231231
model: "gpt-3.5-turbo",
232232
messages: [
233233
OpenAIChatCompletionChoiceMessageModel(
@@ -237,7 +237,7 @@ in addition to calling `OpenAI.instance.chat.create()` which is a `Future` and w
237237
],
238238
);
239239
240-
chatStream.listen((chatStreamEvent) {
240+
chatStream.listen((chatStreamEvent) {
241241
print(chatStreamEvent); // ...
242242
})
243243
```

lib/src/core/models/completion/stream/sub_models/choices.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class OpenAIStreamCompletionModelChoice {
1212
final int? logprobs;
1313

1414
/// The reason the completion finished.
15-
final finishReason;
15+
final String finishReason;
1616

1717
@override
1818
int get hashCode {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_openai
22
description: Dart SDK for openAI Apis (GPT-3 & DALL-E), integrate easily the power of OpenAI's state-of-the-art AI models into their Dart applications.
3-
version: 1.6.1
3+
version: 1.6.2
44
homepage: https://github.com/anasfik/openai
55
repository: https://github.com/anasfik/openai
66
documentation: https://github.com/anasfik/openai/blob/main/README.md

0 commit comments

Comments
 (0)