Skip to content

Commit

Permalink
Merge pull request #108 from Bassiuz/main
Browse files Browse the repository at this point in the history
AssistantData object expects map of file_ids, but api provides a list of strings.
  • Loading branch information
redevrx committed Mar 26, 2024
2 parents 486c2bb + f75b89c commit aa36c8d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,6 @@
- Update Assistant Model
- Add Support Tools to Json
- Update Generate Image Request


## 3.0.5
- Fix Assistant Data Json parsing bug
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ supervised and reinforcement learning techniques.

## Install Package
```dart
chat_gpt_sdk: 3.0.4
chat_gpt_sdk: 3.0.5
```

## Create OpenAI Instance
Expand Down
4 changes: 2 additions & 2 deletions lib/src/model/assistant/response/assistant_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AssistantData {
String instructions;
Map metadata;
String name;
List<Map<String, dynamic>> fileIds;
List<String> fileIds;
int createdAt;
String model;
String id;
Expand All @@ -29,7 +29,7 @@ class AssistantData {
name: json["name"] ?? '',
fileIds: json["file_ids"] == null
? []
: List<Map<String, dynamic>>.from(json["file_ids"].map((x) => x)),
: List<String>.from(json["file_ids"].map((x) => x)),
createdAt: json["created_at"] ?? 0,
model: json["model"] ?? '',
id: json["id"] ?? '',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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.4
version: 3.0.5
homepage: https://www.facebook.com/REDEVRX
repository: https://github.com/redevRx/Flutter-ChatGPT

Expand Down

0 comments on commit aa36c8d

Please sign in to comment.