From 9e39b4e6c0c316bc9ac2fd07bfabfda330bcaa6e Mon Sep 17 00:00:00 2001 From: redevrx Date: Sun, 28 Apr 2024 10:25:06 +0700 Subject: [PATCH] fix issue #109 --- CHANGELOG.md | 7 ++++++- README.md | 2 +- example/pubspec.lock | 4 ++-- example_app/openai_app/pubspec.lock | 4 ++-- example_app/openai_app/pubspec.yaml | 2 +- lib/src/model/run/response/list_run.dart | 4 ++-- pubspec.yaml | 4 ++-- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 696c513..8927e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -227,4 +227,9 @@ - Update Generate Image Request ## 3.0.5 -- Fix Assistant Data Json parsing bug \ No newline at end of file +- Fix Assistant Data Json parsing bug + +## 3.0.6 +- Fix list run case id is null +- Message add runId +- Add fix for assistant_data json parsing \ No newline at end of file diff --git a/README.md b/README.md index 257d3df..aa87ebd 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ supervised and reinforcement learning techniques. ## Install Package ```dart -chat_gpt_sdk: 3.0.5 +chat_gpt_sdk: 3.0.6 ``` ## Create OpenAI Instance diff --git a/example/pubspec.lock b/example/pubspec.lock index 5c4f56d..6af526a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -31,7 +31,7 @@ packages: path: ".." relative: true source: path - version: "3.0.4" + version: "3.0.6" clock: dependency: transitive description: @@ -477,5 +477,5 @@ packages: source: hosted version: "1.0.4" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.3.4 <4.0.0" flutter: ">=3.19.0" diff --git a/example_app/openai_app/pubspec.lock b/example_app/openai_app/pubspec.lock index 630ce79..de55cba 100644 --- a/example_app/openai_app/pubspec.lock +++ b/example_app/openai_app/pubspec.lock @@ -55,7 +55,7 @@ packages: path: "../.." relative: true source: path - version: "3.0.4" + version: "3.0.5" clock: dependency: transitive description: @@ -581,5 +581,5 @@ packages: source: hosted version: "1.0.0" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.3.4 <4.0.0" flutter: ">=3.10.0" diff --git a/example_app/openai_app/pubspec.yaml b/example_app/openai_app/pubspec.yaml index 960c1aa..7577c6e 100644 --- a/example_app/openai_app/pubspec.yaml +++ b/example_app/openai_app/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.1+6 environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '>=3.3.4 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/lib/src/model/run/response/list_run.dart b/lib/src/model/run/response/list_run.dart index 0214d43..c0fe433 100644 --- a/lib/src/model/run/response/list_run.dart +++ b/lib/src/model/run/response/list_run.dart @@ -16,13 +16,13 @@ class ListRun { String object; factory ListRun.fromJson(Map json) => ListRun( - firstId: json["first_id"], + firstId: json["first_id"] ?? '', data: json["data"] == null ? [] : List.from( json["data"].map((x) => CreateRunResponse.fromJson(x)), ), - lastId: json["last_id"], + lastId: json["last_id"] ?? '', hasMore: json["has_more"], object: json["object"], ); diff --git a/pubspec.yaml b/pubspec.yaml index 685e2fa..6e78d2e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: chat_gpt_sdk description: create chat bot and other bot with ChatGPT SDK Support GPT-4 , 3.5 and SSE Generate Prompt (Stream) -version: 3.0.5 +version: 3.0.6 homepage: https://www.facebook.com/REDEVRX repository: https://github.com/redevRx/Flutter-ChatGPT environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '>=3.3.4 <4.0.0' dependencies: dio: ^5.4.1