Refactor Vertex AI to Gemini #25
test.yml
on: pull_request
lint
27s
test-and-build
1m 0s
test-building-docs
24s
test-examples
1m 24s
Annotations
7 errors
|
test-and-build
Process completed with exit code 1.
|
|
src/commands/aiTest/testScript/validatePromptScript.spec.ts > Invalid:
packages/genesys-cloud-chatbot-tester-cli/src/commands/aiTest/testScript/validatePromptScript.spec.ts#L126
AssertionError: expected { …(1) } to match object { error: { details: [ { …(4) } ] } }
(5 matching properties omitted from actual)
- Expected
+ Received
{
"error": {
"details": [
{
"context": {
- "key": "fail",
- "label": "scenarios.test-name-of-test-1.setup.terminatingPhrases.fail",
+ "key": "location",
+ "label": "config.ai.config.location",
},
- "message": "\"scenarios.test-name-of-test-1.setup.terminatingPhrases.fail\" is required",
+ "message": "\"config.ai.config.location\" is not allowed",
"path": [
- "scenarios",
- "test-name-of-test-1",
- "setup",
- "terminatingPhrases",
- "fail",
+ "config",
+ "ai",
+ "config",
+ "location",
],
- "type": "any.required",
+ "type": "object.unknown",
},
],
},
}
❯ src/commands/aiTest/testScript/validatePromptScript.spec.ts:126:30
|
|
src/commands/aiTest/testScript/validatePromptScript.spec.ts > Valid:
packages/genesys-cloud-chatbot-tester-cli/src/commands/aiTest/testScript/validatePromptScript.spec.ts#L49
AssertionError: expected { …(1) } to strictly equal { validPromptScript: { …(2) } }
- Expected
+ Received
@@ -1,7 +1,9 @@
{
- "validPromptScript": {
+ "error": ValidationError {
+ "message": "\"config.ai.config.project\" is not allowed",
+ "_original": {
"config": {
"ai": {
"config": {
"examples": [
{
@@ -56,11 +58,30 @@
"test-failing-phrase-2",
],
"pass": [
"test-passing-phrase-2",
],
+ },
},
},
},
},
+ "details": [
+ {
+ "context": {
+ "child": "project",
+ "key": "project",
+ "label": "config.ai.config.project",
+ "value": "test-project",
+ },
+ "message": "\"config.ai.config.project\" is not allowed",
+ "path": [
+ "config",
+ "ai",
+ "config",
+ "project",
+ ],
+ "type": "object.unknown",
+ },
+ ],
},
}
❯ src/commands/aiTest/testScript/validatePromptScript.spec.ts:49:30
|
|
__tests__/commands/ai/googleGeminiConfigLoads.spec.ts > Google Gemini config > config loaded even if project and location defined in env variable:
packages/genesys-cloud-chatbot-tester-cli/__tests__/commands/ai/googleGeminiConfigLoads.spec.ts#L198
AssertionError: expected "spy" to be called with arguments: [ { …(3) } ]
Received:
1st spy call:
[
{
- "location": "test-location-from-env",
- "project": "test-project-from-env",
"temperature": 123,
},
]
Number of calls: 1
❯ __tests__/commands/ai/googleGeminiConfigLoads.spec.ts:198:53
|
|
__tests__/commands/ai/googleGeminiConfigLoads.spec.ts > Google Gemini config > loading fails if project and location not defined in either:
packages/genesys-cloud-chatbot-tester-cli/__tests__/commands/ai/googleGeminiConfigLoads.spec.ts#L169
AssertionError: expected '' to contain 'Failed to validate Google Vertex AI L…'
- Expected
+ Received
- Failed to validate Google Vertex AI Location and Project config. Provide these in the config file or via environment variables.
❯ __tests__/commands/ai/googleGeminiConfigLoads.spec.ts:169:59
|
|
__tests__/commands/ai/googleGeminiConfigLoads.spec.ts > Google Gemini config > project can be defined as an environment variable:
packages/genesys-cloud-chatbot-tester-cli/__tests__/commands/ai/googleGeminiConfigLoads.spec.ts#L132
AssertionError: expected "spy" to be called with arguments: [ { …(2) } ]
Received:
1st spy call:
[
- {
- "location": "test-location-from-env",
- "project": "test-project-from-env",
- },
+ {},
]
Number of calls: 1
❯ __tests__/commands/ai/googleGeminiConfigLoads.spec.ts:132:53
|
|
__tests__/commands/ai/googleGeminiConfigLoads.spec.ts > Google Gemini config > google-gemini provider is loaded:
packages/genesys-cloud-chatbot-tester-cli/__tests__/commands/ai/googleGeminiConfigLoads.spec.ts#L98
AssertionError: expected "spy" to be called with arguments: [ { …(2) } ]
Received:
1st spy call:
[
- {
- "location": "test-location-from-config",
- "project": "test-project-from-config",
- },
+ {},
]
Number of calls: 1
❯ __tests__/commands/ai/googleGeminiConfigLoads.spec.ts:98:53
|