Description Usage Arguments Details Value Examples
Connect to Watson's Conversation API
1 |
api_key |
API Key |
workspace |
Workspace api |
url |
optional argument that defaults to "https://gateway.watsonplatform.net/assistant/api/v1/workspaces" |
version |
optional argument that defaults to "2018-09-20" |
This function allows you to start a connection to your Watson Assistant
The function returns a lits with the text and the contex that is returned by your assistant.
1 2 3 4 5 6 7 8 9 | if(interactive()){
# See https://cloud.ibm.com/apidocs/assistant
conection <- init(api_key, workspace)
conection[["text"]]
chat1 <- chat("Ignacio", conection, username, password, workspace)
chat1[["text"]]
chat2 <- chat("I would like flower suggestions", chat1, username, password, workspace)
chat2[["text"]]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.