Skip to content

Commit a27968c

Browse files
committed
Put countTokens back in the interface but mark it internal
1 parent 0efb0d0 commit a27968c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

common/api-review/ai.api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export class ChatSession {
139139

140140
// @public
141141
export interface ChromeAdapter {
142+
// @internal (undocumented)
143+
countTokens(request: CountTokensRequest): Promise<Response>;
142144
generateContent(request: GenerateContentRequest): Promise<Response>;
143145
generateContentStream(request: GenerateContentRequest): Promise<Response>;
144146
isAvailable(request: GenerateContentRequest): Promise<boolean>;

packages/ai/src/types/chrome-adapter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { GenerateContentRequest } from './requests';
18+
import { CountTokensRequest, GenerateContentRequest } from './requests';
1919

2020
/**
2121
* <b>(EXPERIMENTAL)</b> Defines an inference "backend" that uses Chrome's on-device model,
@@ -51,4 +51,9 @@ export interface ChromeAdapter {
5151
* @param request - a standard Firebase AI {@link GenerateContentRequest}
5252
*/
5353
generateContentStream(request: GenerateContentRequest): Promise<Response>;
54+
55+
/**
56+
* @internal
57+
*/
58+
countTokens(request: CountTokensRequest): Promise<Response>;
5459
}

0 commit comments

Comments
 (0)