feat: Update Gemini model and improve error handling

Switches to the `gemini-2.5-flash` model for potentially faster and more cost-effective analysis.

Enhances error handling in chart analysis to provide more specific user feedback for API rate limits and credit exhaustion.

Adds UI elements for signal history expansion and introduces pair selection for dashboard statistics, improving user interaction and data visualization.
This commit is contained in:
desartstudio95
2026-05-07 13:24:31 +02:00
parent adc6402b04
commit e225cad4b9
4 changed files with 221 additions and 84 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { AnalysisResponse, SignalType } from "../types";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY || '' });
export const analyzeForexChart = async (imageBase64: string, userNotes?: string, preferredMode?: 'Técnico' | 'Fundamental' | 'Híbrido'): Promise<AnalysisResponse> => {
const model = "gemini-3.1-pro-preview";
const model = "gemini-2.5-flash";
const systemInstruction = `
Você é o QuantScan IA, um sistema avançado de análise de mercado financeiro com inteligência institucional.