@@ -18,7 +18,7 @@ import { expect } from 'chai';
18
18
import { GenerativeModel } from './generative-model' ;
19
19
import { VertexAI } from '../public-types' ;
20
20
21
- const fakeVertex : VertexAI = {
21
+ const fakeVertexAI : VertexAI = {
22
22
app : {
23
23
name : 'DEFAULT' ,
24
24
automaticDataCollectionEnabled : true ,
@@ -32,23 +32,23 @@ const fakeVertex: VertexAI = {
32
32
33
33
describe ( 'GenerativeModel' , ( ) => {
34
34
it ( 'handles plain model name' , ( ) => {
35
- const genModel = new GenerativeModel ( fakeVertex , { model : 'my-model' } ) ;
35
+ const genModel = new GenerativeModel ( fakeVertexAI , { model : 'my-model' } ) ;
36
36
expect ( genModel . model ) . to . equal ( 'publishers/google/models/my-model' ) ;
37
37
} ) ;
38
38
it ( 'handles models/ prefixed model name' , ( ) => {
39
- const genModel = new GenerativeModel ( fakeVertex , {
39
+ const genModel = new GenerativeModel ( fakeVertexAI , {
40
40
model : 'models/my-model'
41
41
} ) ;
42
42
expect ( genModel . model ) . to . equal ( 'publishers/google/models/my-model' ) ;
43
43
} ) ;
44
44
it ( 'handles full model name' , ( ) => {
45
- const genModel = new GenerativeModel ( fakeVertex , {
45
+ const genModel = new GenerativeModel ( fakeVertexAI , {
46
46
model : 'publishers/google/models/my-model'
47
47
} ) ;
48
48
expect ( genModel . model ) . to . equal ( 'publishers/google/models/my-model' ) ;
49
49
} ) ;
50
50
it ( 'handles prefixed tuned model name' , ( ) => {
51
- const genModel = new GenerativeModel ( fakeVertex , {
51
+ const genModel = new GenerativeModel ( fakeVertexAI , {
52
52
model : 'tunedModels/my-model'
53
53
} ) ;
54
54
expect ( genModel . model ) . to . equal ( 'tunedModels/my-model' ) ;
0 commit comments