botium-connector-google-agent-assist v1.0.0
Botium Connector for Google Agent Assist
This is a Botium connector for testing your Google Agent Assist query resolution logic.
Did you read the Botium in a Nutshell articles? Be warned, without prior knowledge of Botium you won't be able to properly use this library!
How it works
It can be used as any other Botium connector with all Botium Stack components:
Prerequisites
- Node.js and NPM
- a Google Cloud project with service account configured in IAM with Dialogflow Client role, Dialogflow Agent Assist Client role, Storage Object Viewer role(needed for cli import)
- Google Cloud ProjectId
- KnowledgeBaseId & Coversation Profile IDcollected from Agent Assist Console
- The deployment name
- A project directory on your workstation to hold test cases and Botium configuration
Install Botium and Google Agent Assist Connector
When using Botium CLI:
> npm install -g botium-cli
> npm install -g botium-connector-google-agent-assist
> botium-cli init
> botium-cli run
When using Botium Bindings:
> npm install -g botium-bindings
> npm install -g botium-connector-google-agent-assist
> botium-bindings init mocha
> npm install && npm run mocha
When using Botium Box:
Already integrated into Botium Box, no setup required
Connecting Google Agent Assist
Open the file botium.json in your working directory and add the Google credentials for accessing Dialogflow API
{
"botium": {
"Capabilities": {
"PROJECTNAME": "<whatever>",
"CONTAINERMODE": "google-agent-assist",
"GOOGLE_AGENT_ASSIST_PROJECT_ID": "<google project id>",
"GOOGLE_AGENT_ASSIST_CLIENT_EMAIL": "<service credentials email>",
"GOOGLE_AGENT_ASSIST_PRIVATE_KEY": "<service credentials private key>",
"GOOGLE_AGENT_ASSIST_CONVERSATION_PROFILE_ID": "<conversation profile id>",
"GOOGLE_AGENT_ASSIST_LANGUAGE_CODE":"en-US",
"GOOGLE_AGENT_ASSIST_API_ENDPOINT":"global-dialogflow.googleapis.com"
}
}
}
Botium setup is ready, you can begin to write your BotiumScript files.
Using the botium-connector-google-agent-assist-cli
This connector provides a CLI interface for importing convos and utterances from your Google Agent Assist FAQ Knowledge base and convert it to BotiumScript.
Note: CLI interface is only applicable for FAQ type of knowledge base whose content is either local csv or cloud storage uri csv format. It can't be used for ARTICLE_SUGGESTION or GENERATIVE KNOWLEDGE_ASSIST type of knowledge base or FAQ of type html.
- Intents(document title) and Utterances(phrases) are converted to BotiumScript utterances and convo files (using the --buildconvos option)
You can either run the CLI with botium-cli (recommended - it is integrated there), or directly from this connector (see samples/Connector-Test/package.json for some examples):
> botium-connector-google-agent-assist-cli import --buildconvos
Please note that a botium-core installation is required
For getting help on the available CLI options and switches, run:
> botium-connector-google-agent-assist-cli import --help
Supported Capabilities
Set the capability CONTAINERMODE to google-agent-assist to activate this connector.
GOOGLE_AGENT_ASSIST_PROJECT_ID
Google Cloud Project ID which is used by Agent Assist.
GOOGLE_AGENT_ASSIST_CLIENT_EMAIL
See Google client email (service account)
GOOGLE_AGENT_ASSIST_PRIVATE_KEY
See Google client private key (service account)
GOOGLE_AGENT_ASSIST_CONVERSATION_PROFILE_ID
See Agent Assist conversation profile ID
GOOGLE_AGENT_ASSIST_LANGUAGE_CODE
(Optional)
The language of this conversational query. See all languages.
default: en-US
Note: This should match the language set on Conversation profile.
Agent Assist supports the multiple language, its multilingual, Connector is not. But you can use more botium.json for each language. (Botium Box, or Botium CLI is recommended in this case. Botium Bindings does not support more botium.xml)
GOOGLE_AGENT_ASSIST_API_ENDPOINT
(Optional)
The Agent Assist API is implemented as an extension of the Dialogflow ES API.
By default the Google Agent Assist connector only works with the US (Global) region of Dialogflow, however it can be configured to connect to a region specific version of Dialogflow. This requires setting the project ID to include the location AND setting a custom API Endpoint for the specific region dialogflow instance. In this example configuration, an example of the dialogflow region would be australia-southeast1
. List of available regions: https://cloud.google.com/dialogflow/es/docs/how/region
default: global-dialogflow.googleapis.com
example:
"GOOGLE_AGENT_ASSIST_API_ENDPOINT": "<dialogflow region>-dialogflow.googleapis.com"
GOOGLE_AGENT_ASSIST_MODE
(Optional)
Specify mode to test specific feature.
Google Agent assist supported features:
- Frequently Asked Question (FAQ) sugegstion
- Article suggestion
- Generative Knowledge Assist
Values: FAQ or ARTICLE_SUGGESTION or KNOWLEDGE_ASSIST
default: faq
See also
5 months ago