Pepguy commited on
Commit
e3293e2
·
verified ·
1 Parent(s): 9b7f8b3

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +8 -2
index.html CHANGED
@@ -43,8 +43,10 @@
43
 
44
 
45
 
46
- // Initialize the Gemini Developer API backend service
47
- const ai = getAI(firebaseApp, { backend: new GoogleAIBackend() });
 
 
48
 
49
  // Create a `LiveGenerativeModel` instance with the flash-live model (only model that supports the Live API)
50
  const model = getLiveGenerativeModel(ai, {
@@ -60,6 +62,10 @@ const session = await model.connect();
60
  // Start the audio conversation
61
  const audioConversationController = await startAudioConversation(session);
62
 
 
 
 
 
63
  // ... Later, to stop the audio conversation
64
  // await audioConversationController.stop()
65
  document.getElementById("clickme").onclick( async ()=> {
 
43
 
44
 
45
 
46
+
47
+ // Initialize the Vertex AI Gemini API backend service
48
+ // Set the location to `us-central1` (the flash-live model is only supported in that location)
49
+ const ai = getAI(firebaseApp, { backend: new VertexAIBackend("us-central1") });
50
 
51
  // Create a `LiveGenerativeModel` instance with the flash-live model (only model that supports the Live API)
52
  const model = getLiveGenerativeModel(ai, {
 
62
  // Start the audio conversation
63
  const audioConversationController = await startAudioConversation(session);
64
 
65
+ // ... Later, to stop the audio conversation
66
+ // await audioConversationController.stop()
67
+
68
+
69
  // ... Later, to stop the audio conversation
70
  // await audioConversationController.stop()
71
  document.getElementById("clickme").onclick( async ()=> {