AdityaRatan commited on
Commit
fc3ae17
·
verified ·
1 Parent(s): 4c33d27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -71,6 +71,16 @@ class GeminiHandler(AsyncStreamHandler):
71
  http_options={"api_version": "v1alpha"},
72
  )
73
 
 
 
 
 
 
 
 
 
 
 
74
  config = LiveConnectConfig(
75
  response_modalities=["AUDIO"], # type: ignore
76
  speech_config=SpeechConfig(
@@ -79,7 +89,7 @@ class GeminiHandler(AsyncStreamHandler):
79
  voice_name=voice_name,
80
  )
81
  )
82
- ),
83
  )
84
  async with client.aio.live.connect(
85
  model="gemini-2.0-flash-exp", config=config
 
71
  http_options={"api_version": "v1alpha"},
72
  )
73
 
74
+ tools = [
75
+ types.Tool(code_execution=types.ToolCodeExecution),
76
+ types.Tool(google_search=types.GoogleSearch()),
77
+ ]
78
+
79
+
80
+
81
+
82
+
83
+
84
  config = LiveConnectConfig(
85
  response_modalities=["AUDIO"], # type: ignore
86
  speech_config=SpeechConfig(
 
89
  voice_name=voice_name,
90
  )
91
  )
92
+ ) tools=tools,
93
  )
94
  async with client.aio.live.connect(
95
  model="gemini-2.0-flash-exp", config=config