Skip to content

Commit 85150a7

Browse files
committed
feat: add Google GenAI integration and update environment variables
1 parent 1f28f26 commit 85150a7

File tree

5 files changed

+234
-22
lines changed

5 files changed

+234
-22
lines changed

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ ADMIN_DB_NAME=postgres
1313

1414
# Culqui Keys
1515
CULQI_PRIVATE_KEY="sk_test_xxx"
16-
VITE_CULQI_PUBLIC_KEY="pk_test_xxx"
16+
VITE_CULQI_PUBLIC_KEY="pk_test_xxx"
17+
18+
GOOGLE_API_KEY="xxx"

.env.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ CS_BASE_URL="https://fullstock-images.s3.us-east-2.amazonaws.com"
99
CULQI_PRIVATE_KEY="sk_test_EC8oOLd3ZiCTKqjN"
1010
VITE_CULQI_PUBLIC_KEY="pk_test_Ws4NXfH95QXlZgaz"
1111

12-
BASE_URL="http://localhost:3000"
12+
BASE_URL="https://fullstock-frontend.onrender.com/"
1313
ARTILLERY_API_KEY="a9_lnmbws559no1kfajobi7aq0mf831v034"

gemini.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { GoogleGenAI } from "@google/genai";
2+
import dotenv from "dotenv";
3+
4+
dotenv.config();
5+
6+
const ai = new GoogleGenAI({
7+
apiKey: process.env.GOOGLE_API_KEY || "",
8+
});
9+
10+
async function main() {
11+
const response = await ai.models.generateContent({
12+
model: "gemini-2.5-flash",
13+
contents: "Explica cómo funciona la IA en pocas palabras",
14+
});
15+
16+
console.log(response.text);
17+
}
18+
19+
await main();

0 commit comments

Comments
 (0)