Skip to content

Commit

Permalink
fix: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Nov 7, 2019
1 parent 32c4b27 commit 0c7d511
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 111 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ rules:
semi:
- error
- always
no-prototype-builtins:
- off
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ deploy:
- provider: script
skip_cleanup: true
script: npx semantic-release
on:
branch: master
repo: watson-developer-cloud/assistant-intermediate
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you need more information about the V1 API, you can go to the [Watson Assista
- Log in to your IBM Cloud account.
- Click **Create**.
- Click **Show** to view the service credentials.
- Copy the `apikey` value, or copy the `username` and `password` values if your service instance doesn't provide an `apikey`.
- Copy the `apikey` value.
- Copy the `url` value.

## Configuring the application
Expand Down Expand Up @@ -62,31 +62,6 @@ If you need more information about the V1 API, you can go to the [Watson Assista
ASSISTANT_URL=https://gateway-wdc.watsonplatform.net/assistant/api
```

- If your service instance uses `username` and `password` credentials, add the `ASSISTANT_USERNAME` and `ASSISTANT_PASSWORD` variables to the *.env* file.

Example *.env* file that configures the `username`, `password`, and `url` for a Watson Assistant service instance hosted in the US South region:

```
ASSISTANT_USERNAME=522be-7b41-ab44-dec3-g1eab2ha73c6
ASSISTANT_PASSWORD=A4Z5BdGENrwu8
ASSISTANT_URL=https://gateway.watsonplatform.net/assistant/api
```
However, if your credentials contain an IAM API key, copy the `apikey` and `url` to the relevant fields.
```JSON
{
"apikey": "ca2905e6-7b5d-4408-9192-e4d54d83e604",
"iam_apikey_description": "Auto generated apikey during resource-key ...",
"iam_apikey_name": "auto-generated-apikey-62b71334-3ae3-4609-be26-846fa59ece42",
"iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Manager",
"iam_serviceid_crn": "crn:v1:bluemix:public:iam...",
"url": "https://gateway-syd.watsonplatform.net/assistant/api"
}
```
```
ASSISTANT_IAM_APIKEY=ca2905e6-7b5d-4408-9192-e4d54d83e604
ASSISTANT_IAM_URL=https://gateway-syd.watsonplatform.net/assistant/api
```

8. Add the `ASSISTANT_ID` to the previous properties

```
Expand Down
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var initContext = {
}
};

/*
/*
* Endpoint to be call from the client side.
* Required.body.firstcall is set when initialising chat and sends initial context (initContext)
* Context is then set when required for actions.
Expand Down Expand Up @@ -95,7 +95,7 @@ app.post('/api/message', function (req, res) {
};

if (req.body.firstCall || req.body.context) {
payload.context = req.body.context || initContext;
payload.context = req.body.context || initContext;
}

// Send the input to the assistant service
Expand Down
Loading

0 comments on commit 0c7d511

Please sign in to comment.