Skip to content

Commit f42dcb7

Browse files
authored
Merge pull request #134 from TECH-C-LT/fix/score-threshold
デフォルトのしきい値を設定
2 parents 0b339c9 + d0aadd1 commit f42dcb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/api/src/features/guardians/guardian.usecase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class GuardianUseCase implements IGuardianUseCase {
4848
input: GuardianTextInput,
4949
): Promise<Result<GuardianResult>> {
5050
try {
51-
const { text, score_threshold, userId, apiKeyId } = input
51+
const { text, score_threshold = 0.5, userId, apiKeyId } = input
5252
const categoryScores = await this.guardianService.guardianText(text)
5353

5454
const flagged = checkFlagged(categoryScores, score_threshold)

0 commit comments

Comments
 (0)