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
2 changes: 1 addition & 1 deletion sdk-samples/interactions_basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_function_calling_client_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_function_calling_server_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_multimodal_response_audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_multimodal_response_image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_stateful.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_stateless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_structured_output_json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_code_execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_computer_use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_google_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_mcp_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
4 changes: 1 addition & 3 deletions sdk-samples/interactions_tool_call_with_mime_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error(
'This version of the GenAI SDK does not support Vertex AI API for interactions.',
);
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_tool_call_with_url_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
2 changes: 1 addition & 1 deletion sdk-samples/interactions_with_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function createInteractionsFromMLDev() {

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
throw new Error('Interactions API is not yet supported on Vertex');
console.log('Interactions API is not yet supported on Vertex');
} else {
await createInteractionsFromMLDev().catch((e) =>
console.error('got error', e),
Expand Down
5 changes: 5 additions & 0 deletions sdk-samples/live_ephemeral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@google/genai';

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

class AsyncQueue<T> {
private queue: T[] = [];
Expand Down Expand Up @@ -127,6 +128,10 @@ async function live(client: GoogleGenAI, model: string) {
}

async function main() {
if (GOOGLE_GENAI_USE_VERTEXAI) {
console.log('This sample is not yet supported by Vertex AI.');
return;
}
let client = new GoogleGenAI({
apiKey: GEMINI_API_KEY,
apiVersion: 'v1alpha',
Expand Down
Empty file modified sdk-samples/run_samples.sh
100644 → 100755
Empty file.
Loading