mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
feat: custom-censor-check (#2437)
* feat: custom-censor-check * chore: adjust
This commit is contained in:
@@ -112,17 +112,17 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
systemPrompt,
|
||||
stringQuoteText
|
||||
}),
|
||||
async () => {
|
||||
(async () => {
|
||||
// censor model and system key
|
||||
if (modelConstantsData.censor && !user.openaiAccount?.key) {
|
||||
await postTextCensor({
|
||||
return postTextCensor({
|
||||
text: `${systemPrompt}
|
||||
${datasetQuoteText}
|
||||
${userChatInput}
|
||||
`
|
||||
});
|
||||
}
|
||||
}
|
||||
})()
|
||||
]);
|
||||
|
||||
// Get the request messages
|
||||
|
Reference in New Issue
Block a user