Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssistantData object expects map of file_ids, but api provides a list of strings. #108

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading