Skip to content

Commit 453f006

Browse files
authored
Refactor Vertex AI to Gemini (#13)
1 parent 60d98eb commit 453f006

31 files changed

+383
-1077
lines changed

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ scenarios:
9999
Then run the test by pointing to the dialogue script file in the terminal:
100100

101101
```shell
102-
web-messaging-tester scripted tests/example.yml
102+
genesys-cloud-chatbot-tester scripted tests/example.yml
103103
```
104104

105105
### Testing with AI
106106

107107
This tool supports two GenAI providers:
108-
* ChatGPT (`gpt-3.5-turbo` model by default)
109-
* Google Vertex AI ([PaLM 2 Chat Bison model](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/chat-bison))
108+
* ChatGPT (`gpt-3.5-turbo` by default)
109+
* Google Gemini (`gemini-2.0-flash` by default)
110110

111111
#### Using ChatGPT
112112
Start by setting up an API key for ChatGPT:
@@ -160,34 +160,27 @@ scenarios:
160160
Then run the AI test by pointing to the scenario file in the terminal:
161161

162162
```shell
163-
web-messaging-tester ai tests/example.yml
163+
genesys-cloud-chatbot-tester ai tests/example.yml
164164
```
165165

166-
For a slightly more detailed guide see: [Let's test a Genesys chatbot with AI](https://www.linkedin.com/pulse/lets-test-genesys-chatbot-ai-lucas-woodward-dvrpc).
166+
For a slightly more detailed guide see: [Let's test a Genesys chatbot with AI](https://makingchatbots.com/p/lets-test-a-genesys-chatbot-with-aihtml).
167167

168-
#### Using Google Vertex AI
168+
#### Using Google Gemini
169169

170-
1. Create a Google Cloud Platform (GCP) account and enabled AI access to Vertex AI
171-
2. Authenticate the machine running this testing tool, with GCP
172-
* The easiest way is [setting up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev)
173-
3. Define a prompt to provide the model with context on how to behave during testing
174-
* Learn more in [Google's Introduction to prompt design](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/introduction-prompt-design)
170+
1. Set environment variables for [Gemini API key, or Gemini API on Vertex AI](https://github.com/googleapis/js-genai/tree/main?tab=readme-ov-file#optional-nodejs-only-using-environment-variables)
171+
2. Define a prompt to provide the model with context on how to behave during testing
172+
* Learn more in [Google's Introduction to prompt design](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/introduction-prompt-design)
175173

176-
The `terminatingPhrases` section defines the phrases you instruct PaLM 2 to say to pass or fail a test.
174+
The `terminatingPhrases` section defines the phrases you instruct the model to return to pass or fail a test.
177175

178-
> [examples/cli-ai-tests/google-vertex-ai-example.yml](https://github.com/makingchatbots/genesys-cloud-chatbot-tester/tree/main/examples/cli-ai-tests/google-vertex-ai-example.yml)
176+
> [examples/cli-ai-tests/google-gemini-example.yml](https://github.com/makingchatbots/genesys-cloud-chatbot-tester/tree/main/examples/cli-ai-tests/google-gemini-example.yml)
179177

180178
```yaml
181179
config:
182-
deploymentId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
183-
region: xxxx.pure.cloud
184180
ai:
185-
provider: google-vertex-ai
181+
provider: google-gemini
186182
config:
187-
modelVersion: "002"
188-
examples:
189-
- input: "What would you like to do today?"
190-
output: "I would like to leave feedback, please"
183+
model: "gemini-2.0-flash"
191184
scenarios:
192185
"Accept survey":
193186
setup:
@@ -214,14 +207,14 @@ scenarios:
214207
Then run the AI test by pointing to the scenario file in the terminal:
215208

216209
```shell
217-
web-messaging-tester ai tests/example.yml
210+
genesys-cloud-chatbot-tester ai tests/example.yml
218211
```
219212

220213
## Example commands
221214

222215
```
223-
$ web-messaging-tester scripted --help
224-
Usage: web-messaging-tester scripted [options] <filePath>
216+
$ genesys-cloud-chatbot-tester scripted --help
217+
Usage: genesys-cloud-chatbot-tester scripted [options] <filePath>
225218

226219
Arguments:
227220
filePath Path of the YAML test-script file
@@ -246,13 +239,13 @@ Options:
246239
Override Deployment ID and Region in test-script file:
247240
248241
```shell
249-
web-messaging-tester scripted test-script.yaml -id 00000000-0000-0000-0000-000000000000 -r xxxx.pure.cloud
242+
genesys-cloud-chatbot-tester scripted test-script.yaml -id 00000000-0000-0000-0000-000000000000 -r xxxx.pure.cloud
250243
```
251244

252245
Run 10 scenarios in parallel:
253246

254247
```shell
255-
web-messaging-tester scripted test-script.yaml --parallel 10
248+
genesys-cloud-chatbot-tester scripted test-script.yaml --parallel 10
256249
```
257250

258251
## Support

docs/api/classes/BotDisconnectedWaitingForResponseError.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: BotDisconnectedWaitingForResponseError
88

9-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:58](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L58)
9+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:66](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L66)
1010

1111
## Extends
1212

@@ -18,7 +18,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:58](https
1818

1919
> **new BotDisconnectedWaitingForResponseError**(`_expectedResponse`, `_responsesReceived`): `BotDisconnectedWaitingForResponseError`
2020
21-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:59](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L59)
21+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:67](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L67)
2222

2323
#### Parameters
2424

@@ -104,7 +104,7 @@ not capture any frames.
104104

105105
> **get** **expectedResponse**(): `string`
106106
107-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:89](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L89)
107+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:97](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L97)
108108

109109
##### Returns
110110

@@ -118,7 +118,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:89](https
118118

119119
> **get** **responsesReceived**(): readonly (`StructuredMessageTextBody` \| `StructuredMessageStructuredBody`)[]
120120
121-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:93](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L93)
121+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:101](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L101)
122122

123123
##### Returns
124124

docs/api/classes/Conversation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: Conversation
88

9-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:130](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L130)
9+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:138](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L138)
1010

1111
Provides an API to simplify sending and receiving messages in a Web Messenger
1212
session.
@@ -36,7 +36,7 @@ console.log(reply);
3636

3737
> **new Conversation**(`messengerSession`, `timeoutSet`, `timeoutClear`): `Conversation`
3838
39-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:142](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L142)
39+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:150](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L150)
4040

4141
#### Parameters
4242

@@ -64,7 +64,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:142](http
6464

6565
> **get** **isDisconnected**(): `boolean`
6666
67-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:203](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L203)
67+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:211](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L211)
6868

6969
Returns whether the conversation has been disconnected
7070

@@ -78,7 +78,7 @@ Returns whether the conversation has been disconnected
7878

7979
> **sendText**(`text`, `delayInMs`): `Promise`\<`void`\>
8080
81-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:234](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L234)
81+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:242](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L242)
8282

8383
Sends text to the conversation
8484

@@ -109,7 +109,7 @@ Delay in milliseconds between calling this method and the text being sent.
109109

110110
> **waitForConversationToClose**(`timeoutInMs`): `Promise`\<`void`\>
111111
112-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:168](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L168)
112+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:176](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L176)
113113

114114
#### Parameters
115115

@@ -127,7 +127,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:168](http
127127

128128
> **waitForConversationToStart**(): `Promise`\<`Conversation`\>
129129
130-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:213](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L213)
130+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:221](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L221)
131131

132132
Resolves when the conversation has started.
133133

@@ -144,7 +144,7 @@ background. This method allows you to wait for this process to finish.
144144

145145
> **waitForResponses**(`timeToWaitAfterLastMessageInMs`): `Promise`\<`string`[]\>
146146
147-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:276](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L276)
147+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:286](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L286)
148148

149149
Wait for all responses until there is a predefined amount of 'silence'.
150150

@@ -164,7 +164,7 @@ Wait for all responses until there is a predefined amount of 'silence'.
164164

165165
> **waitForResponseText**(): `Promise`\<`string`\>
166166
167-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:260](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L260)
167+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:270](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L270)
168168

169169
Resolves on the next response from the other participant in the conversation that contains text.
170170

@@ -180,7 +180,7 @@ If you want to wait for a specific message use [waitForResponseWithTextContainin
180180

181181
> **waitForResponseWithTextContaining**(`text`, `__namedParameters`): `Promise`\<`string`\>
182182
183-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:318](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L318)
183+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:328](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L328)
184184

185185
Resolves when a response is received that contains a specific piece of text.
186186
If no response is received that contains the text within the timeout period
@@ -217,7 +217,7 @@ use [waitForResponseText](#waitforresponsetext).
217217

218218
> **waitForResponseWithTextMatchingPattern**(`pattern`, `__namedParameters`): `Promise`\<`string`\>
219219
220-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:349](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L349)
220+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:359](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L359)
221221

222222
Resolves when a response is received that matches a regular expression.
223223
If no response is received that matches the pattern within the timeout period

docs/api/classes/TimeoutWaitingForDisconnectionError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: TimeoutWaitingForDisconnectionError
88

9-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:100](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L100)
9+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:108](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L108)
1010

1111
## Extends
1212

@@ -18,7 +18,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:100](http
1818

1919
> **new TimeoutWaitingForDisconnectionError**(): `TimeoutWaitingForDisconnectionError`
2020
21-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:101](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L101)
21+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:109](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L109)
2222

2323
#### Returns
2424

docs/api/classes/TimeoutWaitingForResponseError.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: TimeoutWaitingForResponseError
88

9-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:9](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L9)
9+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:17](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L17)
1010

1111
## Extends
1212

@@ -18,7 +18,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:9](https:
1818

1919
> **new TimeoutWaitingForResponseError**(`_timeoutInMs`, `_expectedResponse`, `_responsesReceived`): `TimeoutWaitingForResponseError`
2020
21-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:10](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L10)
21+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:18](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L18)
2222

2323
#### Parameters
2424

@@ -108,7 +108,7 @@ not capture any frames.
108108

109109
> **get** **expectedResponse**(): `string`
110110
111-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:43](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L43)
111+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:51](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L51)
112112

113113
##### Returns
114114

@@ -122,7 +122,7 @@ Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:43](https
122122

123123
> **get** **responsesReceived**(): readonly (`StructuredMessageTextBody` \| `StructuredMessageStructuredBody`)[]
124124
125-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:47](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L47)
125+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:55](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L55)
126126

127127
##### Returns
128128

@@ -136,7 +136,7 @@ readonly (`StructuredMessageTextBody` \| `StructuredMessageStructuredBody`)[]
136136

137137
> **get** **timeoutInMs**(): `number`
138138
139-
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:53](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L53)
139+
Defined in: [packages/genesys-cloud-chatbot-tester/src/Conversation.ts:61](https://github.com/MakingChatbots/genesys-cloud-chatbot-tester-cli/blob/main/packages/genesys-cloud-chatbot-tester/src/Conversation.ts#L61)
140140

141141
##### Returns
142142

docs/assets/cli/demo.cast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{"version": 2, "width": 90, "height": 21, "timestamp": 1643728057, "env": {"SHELL": "/bin/bash", "TERM": "screen"}}
2-
[2.465289, "o", "web-messaging-tester tests/example.yml"]
2+
[2.465289, "o", "genesys-cloud-chatbot-tester tests/example.yml"]
33
[2.962875, "o", "\r\n"]
44
[3.963624, "o", "\u001b[1m\u001b[37mTesting scenario 'Accept Survey'...\u001b[39m\u001b[22m\r\n\u001b[1m\u001b[37m\u001b[39m\u001b[22m"]
55
[4.598767, "o", "\u001b[1m\u001b[90mYou:\u001b[39m\u001b[22m \u001b[90mhi\u001b[39m\r\n"]

examples/cli-ai-tests/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44

55
```shell
66
# .env
7-
export DEPLOYMENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
8-
export REGION=xxxx.pure.cloud
9-
export OPENAI_API_KEY=xx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
7+
export DEPLOYMENT_ID='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
8+
export REGION='xxxx.pure.cloud'
9+
export OPENAI_API_KEY='xx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
1010
```
1111

1212
```shell
1313
export $(cat .env | xargs) && ./chatgpt-run.sh
1414
```
1515

16-
## Vertex AI
16+
## Google Gemini
1717

1818
```shell
1919
# .env
20-
export DEPLOYMENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
21-
export REGION=xxxx.pure.cloud
22-
export GOOGLE_APPLICATION_CREDENTIALS=PATH/TO/JSON
23-
export VERTEX_AI_PROJECT=example-project
24-
export VERTEX_AI_LOCATION=example-location
20+
export DEPLOYMENT_ID='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
21+
export REGION='xxxx.pure.cloud'
22+
export GOOGLE_API_KEY='your-api-key'
2523
```
2624

25+
You can find the environment vars supported by Google's GenAI library this tool uses [in their docs](https://github.com/googleapis/js-genai/tree/main?tab=readme-ov-file#optional-nodejs-only-using-environment-variables).
26+
2727
```shell
28-
export $(cat .env | xargs) && ./google-vertex-ai-run.sh
28+
export $(cat .env | xargs) && ./google-gemini-run.sh
2929
```
3030

3131
# Troubleshooting

examples/cli-ai-tests/chatgpt-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function cleanup {
1010
}
1111
trap cleanup EXIT
1212

13-
web-messaging-tester ai chatgpt-example.yml -id $DEPLOYMENT_ID -r $REGION
13+
genesys-cloud-chatbot-tester ai chatgpt-example.yml -id $DEPLOYMENT_ID -r $REGION
1414
if [ $? -ne 0 ]
1515
then
1616
echo ""

examples/cli-ai-tests/google-vertex-ai-example.yml renamed to examples/cli-ai-tests/google-gemini-example.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
config:
2-
deploymentId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
3-
region: xxxx.pure.cloud
42
ai:
5-
provider: google-vertex-ai
3+
provider: google-gemini
64
config:
7-
modelVersion: "002"
8-
examples:
9-
- input: "What would you like to do today?"
10-
output: "I would like to leave feedback, please"
5+
model: "gemini-2.0-flash"
116
scenarios:
127
"Accept survey":
138
setup:

examples/cli-ai-tests/google-vertex-ai-run.sh renamed to examples/cli-ai-tests/google-gemini-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function cleanup {
1010
}
1111
trap cleanup EXIT
1212

13-
web-messaging-tester ai google-vertex-ai-example.yml -id $DEPLOYMENT_ID -r $REGION
13+
genesys-cloud-chatbot-tester ai google-gemini-example.yml -id $DEPLOYMENT_ID -r $REGION
1414
if [ $? -ne 0 ]
1515
then
1616
echo ""

0 commit comments

Comments
 (0)