Skip to content

Commit 22de205

Browse files
committedMar 28, 2023
🐛 bump openai to the latest version for chat generation support
1 parent d563b23 commit 22de205

File tree

3 files changed

+2244
-2
lines changed

3 files changed

+2244
-2
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"next": "^13.1.6",
1919
"node-telegram-bot-api": "^0.61.0",
2020
"nodemon": "^2.0.20",
21-
"openai": "^3.1.0",
21+
"openai": "^3.2.1",
2222
"react": "^18.2.0",
2323
"react-dom": "^18.2.0"
2424
}

‎services/chatgpt.service.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ChatGPTService {
3333
});
3434

3535
// Gửi request về OpenAI Platform để tạo text completion
36-
const completion = await openai.createCompletion({
36+
const completion = await openai.createChatCompletion({
3737
model: "gpt-3.5-turbo",
3838
temperature: 0.7,
3939
max_tokens: 1000,

0 commit comments

Comments
 (0)