a72d42c6d8
Integrates Gemini 3.1 Pro for improved Forex chart analysis, incorporating detailed instructions on Smart Money Concepts, liquidity, and various confirmation indicators like Volume Delta, ATR, EMA, RSI, and VWAP. Also includes image compression and cleanup utilities for testimonial uploads to manage storage efficiently. Firestore rules for signal data have been updated to accommodate longer strings for pair and timeframe.
19 lines
502 B
TypeScript
19 lines
502 B
TypeScript
import { GoogleGenAI } from "@google/genai";
|
|
import * as dotenv from "dotenv";
|
|
dotenv.config();
|
|
|
|
const test = async () => {
|
|
const ai = new GoogleGenAI({ apiKey: process.env.VITE_GEMINI_API_KEY || process.env.GEMINI_API_KEY || '' });
|
|
try {
|
|
const response = await ai.models.generateContent({
|
|
model: "gemini-3.1-pro-preview",
|
|
contents: "Tell me a joke"
|
|
});
|
|
console.log("Success:", response.text);
|
|
} catch (err: any) {
|
|
console.error("Error:", err.message);
|
|
}
|
|
}
|
|
|
|
test();
|