Skip to content

Commit 2887143

Browse files
committed
VertexAI: use updated set of mock responses
1 parent e6b8525 commit 2887143

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/vertexai/src/methods/generate-content.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('generateContent()', () => {
188188
);
189189
});
190190
it('unknown enum - should ignore', async () => {
191-
const mockResponse = getMockResponse('unary-success-unknown-enum.json');
191+
const mockResponse = getMockResponse('unary-success-unknown-enum-safety-ratings.json');
192192
const makeRequestStub = stub(request, 'makeRequest').resolves(
193193
mockResponse as Response
194194
);
@@ -197,7 +197,7 @@ describe('generateContent()', () => {
197197
'model',
198198
fakeRequestParams
199199
);
200-
expect(result.response.text()).to.include('30 minutes of brewing');
200+
expect(result.response.text()).to.include('Some text');
201201
expect(makeRequestStub).to.be.calledWith(
202202
'model',
203203
Task.GENERATE_CONTENT,

packages/vertexai/src/requests/stream-reader.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ describe('processStream', () => {
174174
});
175175
it('unknown enum - should ignore', async () => {
176176
const fakeResponse = getMockResponseStreaming(
177-
'streaming-success-unknown-enum.txt'
177+
'streaming-success-unknown-safety-enum.txt'
178178
);
179179
const result = processStream(fakeResponse as Response);
180180
const aggregatedResponse = await result.response;

scripts/update_vertexai_responses.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# This script replaces mock response files for Vertex AI unit tests with a fresh
1818
# clone of the shared repository of Vertex AI test data.
1919

20-
RESPONSES_VERSION='v1.*' # The major version of mock responses to use
20+
RESPONSES_VERSION='v2.*' # The major version of mock responses to use
2121
REPO_NAME="vertexai-sdk-test-data"
2222
REPO_LINK="https://github.com/FirebaseExtended/$REPO_NAME.git"
2323

0 commit comments

Comments
 (0)