Skip to content

Commit

Permalink
add new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
redevrx committed Jul 30, 2024
1 parent 921a360 commit ca74252
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,8 @@

## 3.0.9
- Assistants v2
- Deprecate API
- Deprecate API

## 3.1.0
- Add Gpt 4o mini
- Add Doc API version 2 (Assistants v2)
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,21 @@ supervised and reinforcement learning techniques.
- [Modify assistant](#modify-assistant)
- [Delete assistant](#delete-assistant)
- [Delete assistant file](#delete-assistant-file)
- [Using Assistants V2](#using-assistant-v2)
- [Threads](#threads)
- [Create thread](#Create-threads)
- [Retrieve thread](#Retrieve-thread)
- [Modify thread](#Modify-thread)
- [Delete thread](#Delete-thread)
- [Using Thread V2](#using-thread-v2)
- [Messages](#messages)
- [Create message](#Create-message)
- [List messages](#List-messages)
- [List message files](#List-message-files)
- [Retrieve message](#Retrieve-message)
- [Retrieve message file](#Retrieve-message-file)
- [Modify message](#Modify-message)
- [Using Message V2](#using-message-v2)
- [Runs](#runs)
- [Create run](#Create-run)
- [Create thread and run](#Create-thread-and-run)
Expand Down Expand Up @@ -111,7 +114,7 @@ supervised and reinforcement learning techniques.

## Install Package
```dart
chat_gpt_sdk: 3.0.8
chat_gpt_sdk: 3.1.0
```

## Create OpenAI Instance
Expand Down Expand Up @@ -414,6 +417,11 @@ void createAssistantFile() async {
}
```

- ## Using assistant v2
```dart
openAI.assistant.v2;
```

## Threads
- ### Create threads
```dart
Expand Down Expand Up @@ -466,6 +474,11 @@ void createThreads() async {
}
```

- ## Using Thread V2
```dart
openAI.threads.v2;
```

## Messages
- ### Create Message
```dart
Expand Down Expand Up @@ -530,6 +543,12 @@ void retrieveMessageFile() async {
);
}
```

- ## Using Message V2
```dart
openAI.threads.v2.messages;
```

## Runs
- ### Create run
```dart
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.0.9"
version: "3.1.0"
clock:
dependency: transitive
description:
Expand Down
4 changes: 3 additions & 1 deletion lib/src/model/thread/response/thread_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class ThreadResponse {
createdAt: json["created_at"] ?? 0,
id: json["id"] ?? '',
object: json["object"] ?? '',
toolResources: json['tool_resources'] is Map<String, double> ? json['tool_resources'] : null);
toolResources: json['tool_resources'] is Map<String, double>
? json['tool_resources']
: null);

Map<String, dynamic> toJson() => {
"metadata": metadata,
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.9
version: 3.1.0
homepage: https://www.facebook.com/REDEVRX
repository: https://github.com/redevRx/Flutter-ChatGPT

Expand Down

0 comments on commit ca74252

Please sign in to comment.