style: fix biome formatting after audit fixes
This commit is contained in:
@@ -166,12 +166,14 @@ export function startPendingAIAnalysisWorker(
|
|||||||
// Only revert stuck processing messages if there's active processing.
|
// Only revert stuck processing messages if there's active processing.
|
||||||
// Avoids a DB query every recovery interval when the pipeline is idle.
|
// Avoids a DB query every recovery interval when the pipeline is idle.
|
||||||
if (conversationProcessing.size > 0) {
|
if (conversationProcessing.size > 0) {
|
||||||
messageStore.revertStuckProcessingMessages(300000).catch((err: unknown) => {
|
messageStore
|
||||||
logger.error(
|
.revertStuckProcessingMessages(300000)
|
||||||
{ error: String(err) },
|
.catch((err: unknown) => {
|
||||||
"Failed to run stuck processing recovery",
|
logger.error(
|
||||||
);
|
{ error: String(err) },
|
||||||
});
|
"Failed to run stuck processing recovery",
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
|
|||||||
@@ -146,7 +146,11 @@ function isAlreadyDeletedError(error: unknown): boolean {
|
|||||||
return true;
|
return true;
|
||||||
// Fallback: check the message text for the Discord "Unknown Message" string
|
// Fallback: check the message text for the Discord "Unknown Message" string
|
||||||
const msg =
|
const msg =
|
||||||
error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
error instanceof Error
|
||||||
|
? error.message
|
||||||
|
: typeof error === "string"
|
||||||
|
? error
|
||||||
|
: "";
|
||||||
return msg.includes("Unknown Message") || msg.includes("Unknown Channel");
|
return msg.includes("Unknown Message") || msg.includes("Unknown Channel");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ export async function callModerationLLM(
|
|||||||
];
|
];
|
||||||
const completion = await llmChat({
|
const completion = await llmChat({
|
||||||
messages,
|
messages,
|
||||||
max_tokens: maxTokens ?? config.AI_LLM_MAX_COMPLETION_TOKENS ?? 16384,
|
max_tokens:
|
||||||
|
maxTokens ?? config.AI_LLM_MAX_COMPLETION_TOKENS ?? 16384,
|
||||||
jsonResponse: { type: "json_object" },
|
jsonResponse: { type: "json_object" },
|
||||||
retries: 0,
|
retries: 0,
|
||||||
signal,
|
signal,
|
||||||
|
|||||||
@@ -197,7 +197,11 @@ export const configSchema = z
|
|||||||
.positive()
|
.positive()
|
||||||
.default(1024),
|
.default(1024),
|
||||||
AI_LLM_TEXT_BATCH_SIZE: z.coerce.number().int().positive().default(60),
|
AI_LLM_TEXT_BATCH_SIZE: z.coerce.number().int().positive().default(60),
|
||||||
AI_LLM_MAX_COMPLETION_TOKENS: z.coerce.number().int().positive().default(16384),
|
AI_LLM_MAX_COMPLETION_TOKENS: z.coerce
|
||||||
|
.number()
|
||||||
|
.int()
|
||||||
|
.positive()
|
||||||
|
.default(16384),
|
||||||
AI_LLM_MEDIA_ANALYSIS_TIMEOUT_MS: z.coerce
|
AI_LLM_MEDIA_ANALYSIS_TIMEOUT_MS: z.coerce
|
||||||
.number()
|
.number()
|
||||||
.int()
|
.int()
|
||||||
|
|||||||
Reference in New Issue
Block a user