Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Class for Live generative model APIs. The Live API enables low-latency, two-way multimodal interactions with Gemini.
This class should only be instantiated with getLiveGenerativeModel().
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the LiveGenerativeModel class.
Signature:
export declare class LiveGenerativeModel extends AIModel Extends: AIModel
| Property | Modifiers | Type | Description |
|---|---|---|---|
| generationConfig | LiveGenerationConfig | (Public Preview) | |
| systemInstruction | Content | (Public Preview) | |
| toolConfig | ToolConfig | (Public Preview) | |
| tools | Tool[] | (Public Preview) |
| Method | Modifiers | Description |
|---|---|---|
| connect() | (Public Preview) Starts a LiveSession. |
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Signature:
generationConfig: LiveGenerationConfig;This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Signature:
systemInstruction?: Content;This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Signature:
toolConfig?: ToolConfig;This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Signature:
tools?: Tool[];This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Starts a LiveSession.
Signature:
connect(): Promise<LiveSession>;Returns:
Promise<LiveSession>
A LiveSession.
If the connection failed to be established with the server.