Skip to content

Commit 291c53b

Browse files
committed
Use type for inference mode and update docs
1 parent 8307fe5 commit 291c53b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs-devsite/vertexai.hybridparams.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ Optional. Specifies advanced params for in-cloud inference.
3636
inCloudParams?: ModelParams;
3737
```
3838

39+
## HybridParams.inCloudParams
40+
41+
Optional. Specifies advanced params for in-cloud inference.
42+
43+
<b>Signature:</b>
44+
45+
```typescript
46+
inCloudParams?: ModelParams;
47+
```
48+
3949
## HybridParams.mode
4050

4151
Specifies on-device or in-cloud inference. Defaults to prefer on-device.

packages/vertexai/src/api.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ describe('Top level API', () => {
111111
});
112112
it('getGenerativeModel with HybridParams honors a model override', () => {
113113
const genModel = getGenerativeModel(fakeVertexAI, {
114+
<<<<<<< HEAD
114115
mode: 'prefer_on_device',
116+
=======
117+
mode: 'only_in_cloud',
118+
>>>>>>> 814a1dc95 (Use type for inference mode and update docs)
115119
inCloudParams: { model: 'my-model' }
116120
});
117121
expect(genModel.model).to.equal('publishers/google/models/my-model');

0 commit comments

Comments
 (0)