Skip to content

Commit

Permalink
chore: chatgpt接口升级5.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin committed May 2, 2023
1 parent 6790df2 commit 6c14af8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"axios": "^1.3.4",
"chatgpt": "^5.1.2",
"chatgpt": "^5.2.4",
"dotenv": "^16.0.3",
"esno": "^0.16.3",
"express": "^4.18.2",
Expand Down
20 changes: 9 additions & 11 deletions service/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions service/src/storage/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,7 @@ export async function updateConfig(config: Config): Promise<Config> {
const result = await configCol.replaceOne({ _id: config._id }, config, { upsert: true })
if (result.modifiedCount > 0 || result.upsertedCount > 0)
return config
if (result.matchedCount > 0 && result.modifiedCount <= 0 && result.upsertedCount <= 0)
return config
return null
}

0 comments on commit 6c14af8

Please sign in to comment.