@firebase/ai 2.3.0-canary.7a7634f79 → 2.3.0-canary.ccbf7ba36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-public.d.ts +10 -1
- package/dist/ai.d.ts +10 -1
- package/dist/esm/index.esm.js +44 -21
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/src/methods/live-session-helpers.d.ts +2 -2
- package/dist/esm/src/methods/live-session.d.ts +10 -1
- package/dist/esm/src/types/live-responses.d.ts +9 -1
- package/dist/index.cjs.js +44 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.node.cjs.js +44 -21
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +44 -21
- package/dist/index.node.mjs.map +1 -1
- package/dist/src/methods/live-session-helpers.d.ts +2 -2
- package/dist/src/methods/live-session.d.ts +10 -1
- package/dist/src/types/live-responses.d.ts +9 -1
- package/package.json +8 -8
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { FunctionCall, FunctionResponse } from '../types';
|
|
18
18
|
import { LiveSession } from './live-session';
|
|
19
19
|
/**
|
|
20
20
|
* A controller for managing an active audio conversation.
|
|
@@ -39,7 +39,7 @@ export interface StartAudioConversationOptions {
|
|
|
39
39
|
* The handler should perform the function call and return the result as a `Part`,
|
|
40
40
|
* which will then be sent back to the model.
|
|
41
41
|
*/
|
|
42
|
-
functionCallingHandler?: (functionCalls:
|
|
42
|
+
functionCallingHandler?: (functionCalls: FunctionCall[]) => Promise<FunctionResponse>;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Dependencies needed by the {@link AudioConversationRunner}.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { GenerativeContentBlob, LiveServerContent, LiveServerToolCall, LiveServerToolCallCancellation, Part } from '../public-types';
|
|
17
|
+
import { FunctionResponse, GenerativeContentBlob, LiveServerContent, LiveServerToolCall, LiveServerToolCallCancellation, Part } from '../public-types';
|
|
18
18
|
import { WebSocketHandler } from '../websocket';
|
|
19
19
|
/**
|
|
20
20
|
* Represents an active, real-time, bidirectional conversation with the model.
|
|
@@ -61,6 +61,15 @@ export declare class LiveSession {
|
|
|
61
61
|
* @beta
|
|
62
62
|
*/
|
|
63
63
|
sendMediaChunks(mediaChunks: GenerativeContentBlob[]): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Sends function responses to the server.
|
|
66
|
+
*
|
|
67
|
+
* @param functionResponses - The function responses to send.
|
|
68
|
+
* @throws If this session has been closed.
|
|
69
|
+
*
|
|
70
|
+
* @beta
|
|
71
|
+
*/
|
|
72
|
+
sendFunctionResponses(functionResponses: FunctionResponse[]): Promise<void>;
|
|
64
73
|
/**
|
|
65
74
|
* Sends a stream of {@link GenerativeContentBlob}.
|
|
66
75
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { Content, GenerativeContentBlob, Part } from './content';
|
|
17
|
+
import { Content, FunctionResponse, GenerativeContentBlob, Part } from './content';
|
|
18
18
|
import { LiveGenerationConfig, Tool, ToolConfig } from './requests';
|
|
19
19
|
/**
|
|
20
20
|
* User input that is sent to the model.
|
|
@@ -37,6 +37,14 @@ export interface _LiveClientRealtimeInput {
|
|
|
37
37
|
mediaChunks: GenerativeContentBlob[];
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Function responses that are sent to the model in real time.
|
|
42
|
+
*/
|
|
43
|
+
export interface _LiveClientToolResponse {
|
|
44
|
+
toolResponse: {
|
|
45
|
+
functionResponses: FunctionResponse[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
40
48
|
/**
|
|
41
49
|
* The first message in a Live session, used to configure generation options.
|
|
42
50
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/ai",
|
|
3
|
-
"version": "2.3.0-canary.
|
|
3
|
+
"version": "2.3.0-canary.ccbf7ba36",
|
|
4
4
|
"description": "The Firebase AI SDK",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"engines": {
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@firebase/app": "0.14.3-canary.
|
|
52
|
-
"@firebase/app-types": "0.9.3-canary.
|
|
51
|
+
"@firebase/app": "0.14.3-canary.ccbf7ba36",
|
|
52
|
+
"@firebase/app-types": "0.9.3-canary.ccbf7ba36"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@firebase/app-check-interop-types": "0.3.3-canary.
|
|
56
|
-
"@firebase/component": "0.7.0-canary.
|
|
57
|
-
"@firebase/logger": "0.5.0-canary.
|
|
58
|
-
"@firebase/util": "1.13.0-canary.
|
|
55
|
+
"@firebase/app-check-interop-types": "0.3.3-canary.ccbf7ba36",
|
|
56
|
+
"@firebase/component": "0.7.0-canary.ccbf7ba36",
|
|
57
|
+
"@firebase/logger": "0.5.0-canary.ccbf7ba36",
|
|
58
|
+
"@firebase/util": "1.13.0-canary.ccbf7ba36",
|
|
59
59
|
"tslib": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"license": "Apache-2.0",
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@firebase/app": "0.14.3-canary.
|
|
63
|
+
"@firebase/app": "0.14.3-canary.ccbf7ba36",
|
|
64
64
|
"@rollup/plugin-json": "6.1.0",
|
|
65
65
|
"rollup": "2.79.2",
|
|
66
66
|
"rollup-plugin-replace": "2.2.0",
|