🚀 Fix: Update AI pricing to Flash-Lite and fix build lint error
This commit is contained in:
@@ -115,11 +115,11 @@ export class InvoiceProcessor {
|
|||||||
* حساب تكلفة استخدام Gemini بناءً على التسعيرة الحالية
|
* حساب تكلفة استخدام Gemini بناءً على التسعيرة الحالية
|
||||||
*/
|
*/
|
||||||
private calculateCost(usage: any): number {
|
private calculateCost(usage: any): number {
|
||||||
// Gemini 1.5 Flash Pricing (as of late 2024):
|
// Gemini 1.5 Flash-Lite Pricing (from user .env):
|
||||||
// Prompt: $0.075 / 1M tokens
|
// Prompt: $0.10 / 1M tokens
|
||||||
// Completion: $0.30 / 1M tokens
|
// Completion: $0.40 / 1M tokens
|
||||||
const promptCost = (usage.promptTokens / 1000000) * 0.075;
|
const promptCost = (usage.promptTokens / 1000000) * 0.10;
|
||||||
const completionCost = (usage.completionTokens / 1000000) * 0.30;
|
const completionCost = (usage.completionTokens / 1000000) * 0.40;
|
||||||
return promptCost + completionCost;
|
return promptCost + completionCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import {
|
|||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
ShieldAlert,
|
ShieldAlert,
|
||||||
FileWarning,
|
FileWarning,
|
||||||
ChevronRight,
|
|
||||||
Search,
|
Search,
|
||||||
Filter,
|
Filter,
|
||||||
Loader2,
|
Loader2,
|
||||||
|
|||||||
Reference in New Issue
Block a user