mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 13:53:50 +00:00
fix: package plus request (#4492)
* fix plus request (#4476) * perf: package plus request * perf: plus request fix * fix: doc --------- Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
14
packages/service/core/chat/postTextCensor.ts
Normal file
14
packages/service/core/chat/postTextCensor.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export const postTextCensor = (data: { text: string }) =>
|
||||
global
|
||||
.textCensorHandler(data)
|
||||
.then((res) => {
|
||||
if (res?.code === 5000) {
|
||||
return Promise.reject(res);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err?.code === 5000) {
|
||||
return Promise.reject(err.message);
|
||||
}
|
||||
return Promise.resolve('');
|
||||
});
|
Reference in New Issue
Block a user