Skip to content

Commit b2b8460

Browse files
committed
2 parents 5194892 + d397d01 commit b2b8460

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

docs-devsite/ai.livesession.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export declare class LiveSession
2929

3030
| Property | Modifiers | Type | Description |
3131
| --- | --- | --- | --- |
32-
| [connectionPromise](./ai.livesession.md#livesessionconnectionpromise) | | Promise&lt;void&gt; | <b><i>(Public Preview)</i></b> Allows external code to await the opening of the websocket connection. |
32+
| [connectionPromise](./ai.livesession.md#livesessionconnectionpromise) | | Promise&lt;void&gt; | <b><i>(Public Preview)</i></b> Allows external code to await the opening of the WebSocket connection. |
3333
| [inConversation](./ai.livesession.md#livesessioninconversation) | | boolean | <b><i>(Public Preview)</i></b> Indicates whether this Live session is being controlled by an <code>AudioConversationController</code>. |
3434
| [isClosed](./ai.livesession.md#livesessionisclosed) | | boolean | <b><i>(Public Preview)</i></b> Indicates whether this Live session is closed. |
3535

@@ -53,7 +53,7 @@ export declare class LiveSession
5353
> 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.
5454
>
5555

56-
Allows external code to await the opening of the websocket connection.
56+
Allows external code to await the opening of the WebSocket connection.
5757

5858
<b>Signature:</b>
5959

docs-devsite/ai.segment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface Segment
2424
| --- | --- | --- |
2525
| [endIndex](./ai.segment.md#segmentendindex) | number | The zero-based end index of the segment within the specified <code>Part</code>, measured in UTF-8 bytes. This offset is exclusive, meaning the character at this index is not included in the segment. |
2626
| [partIndex](./ai.segment.md#segmentpartindex) | number | The zero-based index of the [Part](./ai.md#part) object within the <code>parts</code> array of its parent [Content](./ai.content.md#content_interface) object. This identifies which part of the content the segment belongs to. |
27-
| [startIndex](./ai.segment.md#segmentstartindex) | number | The zero-based start index of the segment within the specified <code>Part</code>, measured in UTF-8 bytes. This offset is inclusive, starting from 0 at the beginning of the part's content (e.g., <code>Part.text</code>). |
27+
| [startIndex](./ai.segment.md#segmentstartindex) | number | The zero-based start index of the segment within the specified <code>Part</code>, measured in UTF-8 bytes. This offset is inclusive, starting from 0 at the beginning of the part's content (for example, <code>Part.text</code>). |
2828
| [text](./ai.segment.md#segmenttext) | string | The text corresponding to the segment from the response. |
2929

3030
## Segment.endIndex
@@ -49,7 +49,7 @@ partIndex: number;
4949

5050
## Segment.startIndex
5151

52-
The zero-based start index of the segment within the specified `Part`<!-- -->, measured in UTF-8 bytes. This offset is inclusive, starting from 0 at the beginning of the part's content (e.g., `Part.text`<!-- -->).
52+
The zero-based start index of the segment within the specified `Part`<!-- -->, measured in UTF-8 bytes. This offset is inclusive, starting from 0 at the beginning of the part's content (for example, `Part.text`<!-- -->).
5353

5454
<b>Signature:</b>
5555

docs-devsite/ai.slidingwindow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ https://github.com/firebase/firebase-js-sdk
1515
1616
Configures the sliding window context compression mechanism.
1717

18-
The context window will be truncated by keeping only a suffix of it.
18+
The sliding window discards content at the beginning of the context window. The resulting context will always begin at the start of a `user` role turn. System instructions will always remain at the start of the result.
1919

2020
<b>Signature:</b>
2121

@@ -27,14 +27,14 @@ export interface SlidingWindow
2727

2828
| Property | Type | Description |
2929
| --- | --- | --- |
30-
| [targetTokens](./ai.slidingwindow.md#slidingwindowtargettokens) | number | <b><i>(Public Preview)</i></b> The session reduction target, i.e., how many tokens we should keep. |
30+
| [targetTokens](./ai.slidingwindow.md#slidingwindowtargettokens) | number | <b><i>(Public Preview)</i></b> The session reduction target, for example, how many tokens the model should keep. |
3131

3232
## SlidingWindow.targetTokens
3333

3434
> 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.
3535
>
3636

37-
The session reduction target, i.e., how many tokens we should keep.
37+
The session reduction target, for example, how many tokens the model should keep.
3838

3939
<b>Signature:</b>
4040

packages/ai/src/methods/live-session.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ export class LiveSession {
6262
*/
6363
inConversation = false;
6464
/**
65-
* Allows external code to await the opening of the websocket connection.
65+
* Allows external code to await the opening of the WebSocket connection.
6666
*/
6767
connectionPromise: Promise<void>;
6868
/**
69-
* Generator yielding websocket messages from the server.
69+
* Generator yielding WebSocket messages from the server.
7070
*/
7171
private _serverMessages: AsyncGenerator<unknown> | null = null;
7272
/**
73-
* Websocket handler. Injectable for testing.
73+
* WebSocket handler. Injectable for testing.
7474
*/
7575
private _webSocketHandler: WebSocketHandler;
7676

@@ -88,7 +88,7 @@ export class LiveSession {
8888
}
8989

9090
/**
91-
* Initializes connection to the websocket. Should be called immediately
91+
* Initializes connection to the WebSocket. Should be called immediately
9292
* after instantiation.
9393
*
9494
* @internal

packages/ai/src/types/requests.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,17 @@ export interface LiveGenerationConfig {
215215
* Configures the sliding window context compression mechanism.
216216
*
217217
* @remarks
218-
* The context window will be truncated by keeping only a suffix of it.
218+
* The sliding window discards content at the beginning of the
219+
* context window. The resulting context will always begin at
220+
* the start of a `user` role turn. System instructions
221+
* will always remain at the start of the result.
219222
*
220223
* @beta
221224
*/
222225
export interface SlidingWindow {
223226
/**
224-
* The session reduction target, i.e., how many tokens we should keep.
227+
* The session reduction target, for example, how many tokens the model
228+
* should keep.
225229
*/
226230
targetTokens?: number;
227231
}

packages/ai/src/types/responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export interface Segment {
362362
/**
363363
* The zero-based start index of the segment within the specified `Part`,
364364
* measured in UTF-8 bytes. This offset is inclusive, starting from 0 at the
365-
* beginning of the part's content (e.g., `Part.text`).
365+
* beginning of the part's content (for example, `Part.text`).
366366
*/
367367
startIndex: number;
368368
/**

0 commit comments

Comments
 (0)