Skip to content
Open
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
847 changes: 847 additions & 0 deletions api-report/genai-node.api.md

Large diffs are not rendered by default.

847 changes: 847 additions & 0 deletions api-report/genai-web.api.md

Large diffs are not rendered by default.

847 changes: 847 additions & 0 deletions api-report/genai.api.md

Large diffs are not rendered by default.

81 changes: 45 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions sdk-samples/interactions_basic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {GoogleGenAI} from '@google/genai';

const GEMINI_API_KEY = process.env.GEMINI_API_KEY;
const GOOGLE_GENAI_USE_VERTEXAI = process.env.GOOGLE_GENAI_USE_VERTEXAI;

async function createInteractionsFromMLDev() {
const ai = new GoogleGenAI({
apiKey: GEMINI_API_KEY,
});
const response = await ai.interactions.create({
model: 'gemini-2.5-flash',
input: 'why is the sky blue?',
});
console.debug(response);
}

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
);
}
}

main();
Loading