LiveAPIClientParameters
Gemini.LiveAPIClient parameters. Can be passed as arguments to the Gemini.createLiveAPIClient method.
Props
apiKey
apiKey: string
| undefined
Optional. Gemini API key. Required for [Backend.GEMINI_API]. Get a Gemini API key here.
backend
backend: Optional. Backend is the GenAI backend to use for the client. The default value is [Backend.GEMINI_API].
httpOptions
httpOptions: Object
Optional. HTTP options to override. NOTE: the 'baseUrl' parameter will be ignored.
location
location: string
| undefined
Optional. GCP Location/Region for Vertex AI. Required for [Backend.VERTEX_AI]. Generative AI locations.
model
model: string
| undefined
Optional. The model to use for Gemini Live API processing. The default value is gemini-2.0-flash-exp.
onWebSocketClose
onWebSocketClose: (event: WebSocketEvents.CLOSE) => void
| undefined
Optional. A callback function that is called when the WebSocket connection is closed.
project
project: string
| undefined
Optional. GCP Project ID for Vertex AI. Required for [Backend.VERTEX_AI]. Find your Project ID here.
statistics
statistics: false
| undefined
| true
Optional. Enables statistics functionality.
trace
trace: false
| undefined
| true
Optional. Whether to enable the tracing functionality. If tracing is enabled, an URL to the trace file appears in the websocket.created message. The file contains all sent and received WebSocket messages in the plain text format. The file is uploaded to the S3 storage.
Note: Enable this only for diagnostic purposes. You can provide the trace file to our support team to help investigating issues.