@live-assistant/gemini 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. package/README.md +26 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # @live-assistant/gemini
2
2
 
3
- The Gemini Live implementation of `AssistantSession`: one WebSocket, its setup handshake, and the frames in both directions (binary JSON frames, 16 kHz in and 24 kHz out, generic tool calls and cancellations).
3
+ The Gemini Live implementation of `AssistantSession`: one WebSocket, its setup
4
+ handshake, and the frames in both directions — binary JSON frames, 16 kHz in,
5
+ 24 kHz out, generic tool calls and cancellations.
6
+
7
+ ```sh
8
+ npm install @live-assistant/gemini @live-assistant/core
9
+ ```
4
10
 
5
11
  ```ts
12
+ import { GeminiLiveSession } from '@live-assistant/gemini';
13
+
6
14
  const session = new GeminiLiveSession();
7
- await session.connect({ token, model }); // wsUrl defaults to the constrained endpoint
15
+ // `wsUrl` defaults to the constrained endpoint; the token carries the rest.
16
+ await session.connect({ token, model });
8
17
  ```
9
18
 
10
- Tokens come from `@live-assistant/token-server`. Gemini fixes the session's configuration when the token is minted.
19
+ Hand it to an `AssistantController` rather than driving it yourself the
20
+ controller is what turns a socket into a conversation.
21
+
22
+ ## The one thing to know
23
+
24
+ **The session's configuration lives in the token, not in `connect`.** Gemini
25
+ fixes the system instruction, the tools and the voice when the token is minted
26
+ and discards a setup frame sent by the client, so a tool the token did not
27
+ declare does not exist — with no error. Mint with
28
+ [`@live-assistant/token-server`](https://www.npmjs.com/package/@live-assistant/token-server)
29
+ and declare your tools there.
30
+
31
+ Tokens are single-use. Reusing one closes the socket during the handshake, which
32
+ surfaces as `closed_before_ready`.
11
33
 
12
- See the [overview](../README.md).
34
+ See the [overview](https://github.com/Recipely-Team/live-assistant#readme).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-assistant/gemini",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Gemini Live adapter for @live-assistant/core: the socket, its setup handshake and the frames in both directions.",
5
5
  "license": "MIT",
6
6
  "author": "Recep Tayyip Ekşi",
@@ -40,6 +40,6 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@live-assistant/core": "0.1.0"
43
+ "@live-assistant/core": "0.2.0"
44
44
  }
45
45
  }