We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f681482 commit 84dfecaCopy full SHA for 84dfeca
packages/vertexai/test-utils/mock-response.ts
@@ -49,6 +49,9 @@ export function getMockResponseStreaming(
49
filename: string,
50
chunkLength: number = 20
51
): Partial<Response> {
52
+ if (!(filename in mocksLookup)) {
53
+ throw Error(`Mock response file '${filename}' not found.`);
54
+ }
55
const fullText = mocksLookup[filename];
56
57
return {
@@ -57,6 +60,9 @@ export function getMockResponseStreaming(
60
}
58
61
59
62
export function getMockResponse(filename: string): Partial<Response> {
63
64
65
66
67
68
ok: true,
0 commit comments