feat: custom-censor-check (#2437)

* feat: custom-censor-check

* chore: adjust
This commit is contained in:
Finley Ge
2024-08-20 10:05:19 +08:00
committed by GitHub
parent 5fab3734fa
commit 238381256d
2 changed files with 4 additions and 4 deletions

View File

@@ -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