mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-12 06:07:27 +08:00
[F] Fix safety
This commit is contained in:
@@ -57,7 +57,7 @@ class AquaNetSafetyService(
|
|||||||
val map = safety.findAll().associateBy { it.content.lowercase().trim() }.toMutableMap()
|
val map = safety.findAll().associateBy { it.content.lowercase().trim() }.toMutableMap()
|
||||||
|
|
||||||
// Process unseen content with OpenAI
|
// Process unseen content with OpenAI
|
||||||
val news = contents.filter { it.lowercase().trim() !in map }.map { inp ->
|
val news = contents.filter { it.lowercase().trim() !in map && it !in contents }.map { inp ->
|
||||||
HTTP.post("https://api.openai.com/v1/moderations") {
|
HTTP.post("https://api.openai.com/v1/moderations") {
|
||||||
header("Authorization", "Bearer ${openAIConfig.apiKey}")
|
header("Authorization", "Bearer ${openAIConfig.apiKey}")
|
||||||
header("Content-Type", "application/json")
|
header("Content-Type", "application/json")
|
||||||
|
|||||||
Reference in New Issue
Block a user