Skip to content

Commit 817002e

Browse files
committed
fix up comments, docs
1 parent 729a053 commit 817002e

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

packages/vertexai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"scripts": {
3131
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
3232
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
33-
"build": "rollup -c",
33+
"build": "rollup -c && yarn api-report",
3434
"build:deps": "lerna run --scope @firebase/vertexai --include-dependencies build",
3535
"dev": "rollup -c -w",
3636
"testsetup": "yarn ts-node ./test-utils/convert-mocks.ts",

packages/vertexai/src/api.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export function getVertexAI(app: FirebaseApp = getApp()): VertexAI {
5252
});
5353
}
5454

55+
/**
56+
* Returns a {@link GenerativeModel} class with methods for inference
57+
* and other functionality.
58+
*
59+
* @public
60+
*/
5561
export function getGenerativeModel(
5662
vertexAI: VertexAI,
5763
modelParams: ModelParams,

packages/vertexai/src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ERRORS: ErrorMap<VertexError> = {
3939
`contain a valid project ID.`,
4040
[VertexError.NO_MODEL]:
4141
`Must provide a model name. ` +
42-
`Example: genai.getGenerativeModel({ model: 'my-model-name' })`,
42+
`Example: getGenerativeModel({ model: 'my-model-name' })`,
4343
[VertexError.PARSE_FAILED]: `Parsing failed: {$message}`,
4444
[VertexError.RESPONSE_ERROR]:
4545
`Response error: {$message}. Response body stored in ` +

packages/vertexai/src/types/requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface BaseParams {
3333
}
3434

3535
/**
36-
* Params passed to {@link GoogleGenerativeAI.getGenerativeModel}.
36+
* Params passed to {@link getGenerativeModel}.
3737
* @public
3838
*/
3939
export interface ModelParams extends BaseParams {

packages/vertexai/src/types/responses.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export interface GenerateContentResponse {
7474
usageMetadata?: UsageMetadata;
7575
}
7676

77+
/**
78+
* Usage metadata about response.
79+
*
80+
* @public
81+
*/
7782
export interface UsageMetadata {
7883
promptTokenCount: number;
7984
candidatesTokenCount: number;

0 commit comments

Comments
 (0)