Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ ADMIN_DB_NAME=postgres

# Culqui Keys
CULQI_PRIVATE_KEY="sk_test_xxx"
VITE_CULQI_PUBLIC_KEY="pk_test_xxx"
VITE_CULQI_PUBLIC_KEY="pk_test_xxx"

GOOGLE_API_KEY="xxx"
5 changes: 4 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ ADMIN_DB_NAME=postgres
CS_BASE_URL="https://fullstock-images.s3.us-east-2.amazonaws.com"

CULQI_PRIVATE_KEY="sk_test_EC8oOLd3ZiCTKqjN"
VITE_CULQI_PUBLIC_KEY="pk_test_Ws4NXfH95QXlZgaz"
VITE_CULQI_PUBLIC_KEY="pk_test_Ws4NXfH95QXlZgaz"

BASE_URL="https://fullstock-frontend.onrender.com/"
ARTILLERY_API_KEY="a9_lnmbws559no1kfajobi7aq0mf831v034"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ dist-ssr

build/
.env
.env.example
.env.test

# Playwright
/test-results/
Expand Down
38 changes: 38 additions & 0 deletions gemini.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { GoogleGenAI } from "@google/genai";
import dotenv from "dotenv";

dotenv.config();

const ai = new GoogleGenAI({
apiKey: process.env.GOOGLE_API_KEY || "",
});

async function main() {
const chat = ai.chats.create({
model: "gemini-2.5-flash",
history: [],
});

const message1 = "Hola, mi nombre es Diego";

console.log("User: ", message1);

const response1 = await chat.sendMessageStream({
message: message1,
});
for await (const chunk of response1) {
console.log(chunk.text);
}

const message2 = "Sabes cuál es mi nombre?";
console.log("User: ", message2);

const response2 = await chat.sendMessageStream({
message: message2,
});
for await (const chunk of response2) {
console.log(chunk.text);
}
}

await main();
Loading