File tree Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 30
30
"scripts" : {
31
31
"lint" : " eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'" ,
32
32
"lint:fix" : " eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'" ,
33
- "build" : " rollup -c" ,
33
+ "build" : " rollup -c && yarn api-report " ,
34
34
"build:deps" : " lerna run --scope @firebase/vertexai --include-dependencies build" ,
35
35
"dev" : " rollup -c -w" ,
36
36
"testsetup" : " yarn ts-node ./test-utils/convert-mocks.ts" ,
Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ export function getVertexAI(app: FirebaseApp = getApp()): VertexAI {
52
52
} ) ;
53
53
}
54
54
55
+ /**
56
+ * Returns a {@link GenerativeModel} class with methods for inference
57
+ * and other functionality.
58
+ *
59
+ * @public
60
+ */
55
61
export function getGenerativeModel (
56
62
vertexAI : VertexAI ,
57
63
modelParams : ModelParams ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const ERRORS: ErrorMap<VertexError> = {
39
39
`contain a valid project ID.` ,
40
40
[ VertexError . NO_MODEL ] :
41
41
`Must provide a model name. ` +
42
- `Example: genai. getGenerativeModel({ model: 'my-model-name' })` ,
42
+ `Example: getGenerativeModel({ model: 'my-model-name' })` ,
43
43
[ VertexError . PARSE_FAILED ] : `Parsing failed: {$message}` ,
44
44
[ VertexError . RESPONSE_ERROR ] :
45
45
`Response error: {$message}. Response body stored in ` +
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export interface BaseParams {
33
33
}
34
34
35
35
/**
36
- * Params passed to {@link GoogleGenerativeAI. getGenerativeModel}.
36
+ * Params passed to {@link getGenerativeModel}.
37
37
* @public
38
38
*/
39
39
export interface ModelParams extends BaseParams {
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ export interface GenerateContentResponse {
74
74
usageMetadata ?: UsageMetadata ;
75
75
}
76
76
77
+ /**
78
+ * Usage metadata about response.
79
+ *
80
+ * @public
81
+ */
77
82
export interface UsageMetadata {
78
83
promptTokenCount : number ;
79
84
candidatesTokenCount : number ;
You can’t perform that action at this time.
0 commit comments