Releases: ovotech/genesys-web-messaging-tester
Allow Vertex AI config via env vars
As well as upgrading a number of dependencies this change also makes it possible to define the project and location of your GCP project in environment variables:
export VERTEX_AI_PROJECT="..."
export VERTEX_AI_LOCATION="..."
Full Changelog: genesys-web-messaging-tester-cli-v3.0.2...genesys-web-messaging-tester-cli-v3.0.3
Show placeholder values
When the AI command is run any placeholder values will be shown prior to the conversation starting. This allows the user to see the difference between multiple runs without being overloaded with the entire prompt being presenting.
Example:
NAME: John
Conversation
------------
AI: Hello, my name is John
Chatbot: What would you like to do?
AI: Leave feedback
Full Changelog: genesys-web-messaging-tester-cli-v3.0.1...genesys-web-messaging-tester-cli-v3.0.2
genesys-web-messaging-tester-cli-v3.0.1
What's Changed
- Add Google Vertex AI as AI test provider by @SketchingDev in #164
- Generate prompts with placeholders by @SketchingDev in #170
Full Changelog: genesys-web-messaging-tester-cli-v2.0.3...genesys-web-messaging-tester-cli-v3.0.1
Add wait for convo to close method
Adds a new method to the API to wait for a conversation to close.
Example usage:
await expect(convo.waitForConversationToClose()).resolves.toBeUndefined();
Closes #165
Full Changelog: genesys-web-messaging-tester-cli-v2.0.2...genesys-web-messaging-tester-cli-v2.0.3
Fix loading AI config
Fixes the loading of the config section of the AI commands test file.
Also updates the participant attribute IsTest
to IsAutomatedTest
to remove confusion with Flow.IsTest
Full Changelog: genesys-web-messaging-tester-cli-v2.0.0...genesys-web-messaging-tester-cli-v2.0.2
Add ability to test chatbots using AI
Adds the ability to test chatbots using ChatGPT.
Once OPENAI_API_KEY
is set with the API key for OpenAI then tests are started with the ai
command:
web-messaging-tester ai example.yml -id $DEPLOYMENT_ID -r $REGION
AI test definitions take the form of a prompt with phrases used for whether the test is considered a success or failure:
scenarios:
"Accept survey":
setup:
prompt: |
I want you to play the role of a customer talking to a company's online chatbot. You must not
break from this role, and all of your responses must be based on how a customer would realistically talk to a company's chatbot.
To help you play the role of a customer consider the following points when writing a response:
* Respond to questions with as few words as possible
* Answer with the exact word when given options e.g. if asked to answer with either 'yes' or 'no' answer with either 'yes' or 'no' without punctuation, such as full stops
As a customer you would like to leave feedback of a recent purchase of a light bulb you made where a customer service
rep was very helpful in finding the bulb with the correct fitting.
If at any point in the company's chatbot repeats itself then say the word 'FAIL'.
If you have understood your role and the purpose of your conversation with the company's chatbot then say the word 'Hello'
and nothing else.
terminatingPhrases:
pass: ["PASS"]
fail: ["FAIL"]
Full Changelog: genesys-web-messaging-tester-cli-v1.0.14...genesys-web-messaging-tester-cli-v2.0.0
Retry on failure due to unordered message
Adds logic to handle unordered messages coming from Genesys. Previously this would have resulted in test runs failing, however now the CLI will retry individual tests that have failed as a result of unordered messages.
Read more: unordered-messages.md
Full Changelog: genesys-web-messaging-tester-cli-v1.0.13...genesys-web-messaging-tester-cli-v1.0.14
Add timeout option to CLI
Adds an option to the CLI to customise the amount of time the waitFor...
assertions will wait before failing the test.
The option is in seconds and can be defined in two ways:
web-messaging-tester example-pass.yml -id $DEPLOYMENT_ID -r $REGION -p 10 --timeout 20
web-messaging-tester example-pass.yml -id $DEPLOYMENT_ID -r $REGION -p 10 -t 20
Full Changelog: genesys-web-messaging-tester-cli-v1.0.11...genesys-web-messaging-tester-cli-v1.0.13
Add RegEx matching
Add ability to match bot responses by regex:
CLI
config:
deploymentId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
region: xxxx.pure.cloud
scenarios:
"Accept Survey":
- say: hi
- waitForReplyContaining: Can we ask you some questions about your experience today?
- say: Yes
- waitForReplyMatching: Thank you! Now for the next question[\.]+
API
await convo.waitForResponseWithTextMatchingPattern(
new RegExp(/Thank you! Now for the next question[\.]+/, 'im'),
{
timeoutInSeconds: 10,
},
);
Full Changelog: genesys-web-messaging-tester-cli-v1.0.10...genesys-web-messaging-tester-cli-v1.0.11
Dynamically load PureCloud Client
Only loads package purecloud-platform-client-v2
when needed. This prevents tests failing due to the package's file watcher starting even when the conversation ID wasn't being associated.