Spaces:
Running
Running
Deploy 2b0ff8e từ GitHub Actions
Browse files227 unmodified lines228229230231232233234235236237227 unmodified linesthrow lastErr;}/** Hệ số nhân token thực tế, đọc từ GEMINI_ACTUAL_WEIGHT (mặc định 10); mỗi lần gọi chốt hệ số này vào kết quả ảnh */export function actualWeight() {const n = Number(process.env.GEMINI_ACTUAL_WEIGHT);return process.env.GEMINI_ACTUAL_WEIGHT && Number.isFinite(n) && n >= 0 ? n : 10;}export async function geminiExtract(image: Buffer, mimeType: string, hint?: string): Promise<{ llm: LlmOutput; usage: { promptTokens: number; outputTokens: number; thinkingTokens: number; weight: number; model: string } }> {227 unmodified lines228229230231232233234235236237227 unmodified linesthrow lastErr;}/** Hệ số nhân token thực tế, đọc từ GEMINI_ACTUAL_WEIGHT (mặc định 5); mỗi lần gọi chốt hệ số này vào kết quả ảnh */export function actualWeight() {const n = Number(process.env.GEMINI_ACTUAL_WEIGHT);return process.env.GEMINI_ACTUAL_WEIGHT && Number.isFinite(n) && n >= 0 ? n : 5;}export async function geminiExtract(image: Buffer, mimeType: string, hint?: string): Promise<{ llm: LlmOutput; usage: { promptTokens: number; outputTokens: number; thinkingTokens: number; weight: number; model: string } }> {
passport-check/apps/server/src/gemini.ts+2-2