fix(moderation): remove unsupported chat_template_kwargs and reasoning_budget
API provider returns 400 error for these params. Removed from all LLM calls in llmModerationClient.ts and indonesianTextNormalizer.ts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
13efb576d6
commit
80f1069e2f
@@ -272,8 +272,6 @@ async function callPrimaryAiModeration(text: string): Promise<string[]> {
|
|||||||
max_tokens: 200,
|
max_tokens: 200,
|
||||||
stream: false,
|
stream: false,
|
||||||
response_format: { type: "json_object" },
|
response_format: { type: "json_object" },
|
||||||
chat_template_kwargs: { enable_thinking: false },
|
|
||||||
reasoning_budget: 0,
|
|
||||||
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming);
|
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -371,7 +369,6 @@ async function callNemotronContentSafety(text: string): Promise<string[]> {
|
|||||||
temperature: 0.2,
|
temperature: 0.2,
|
||||||
top_p: 0.7,
|
top_p: 0.7,
|
||||||
stream: false,
|
stream: false,
|
||||||
chat_template_kwargs: { request_categories: "/categories" },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -609,8 +609,6 @@ const analyzeSingleMediaImage = async (
|
|||||||
top_p: 0.9,
|
top_p: 0.9,
|
||||||
max_tokens: 500,
|
max_tokens: 500,
|
||||||
stream: false,
|
stream: false,
|
||||||
chat_template_kwargs: { enable_thinking: false },
|
|
||||||
reasoning_budget: 0,
|
|
||||||
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming),
|
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -698,8 +696,6 @@ async function callModerationLLM(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
stream: false,
|
stream: false,
|
||||||
chat_template_kwargs: { enable_thinking: false },
|
|
||||||
reasoning_budget: 0,
|
|
||||||
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming),
|
} as OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user