{"id":13800433,"url":"https://github.com/watson-developer-cloud/assistant-simple","last_synced_at":"2025-05-15T08:09:04.554Z","repository":{"id":40791149,"uuid":"59693329","full_name":"watson-developer-cloud/assistant-simple","owner":"watson-developer-cloud","description":"A simple sample application demonstrating the Watson Assistant api.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:37:44.000Z","size":13747,"stargazers_count":481,"open_issues_count":22,"forks_count":1132,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-02-26T03:35:28.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://assistant-simple.ng.bluemix.net/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watson-developer-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-25T19:55:36.000Z","updated_at":"2024-10-31T04:08:24.000Z","dependencies_parsed_at":"2023-02-02T20:45:15.926Z","dependency_job_id":null,"html_url":"https://github.com/watson-developer-cloud/assistant-simple","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fassistant-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fassistant-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fassistant-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fassistant-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watson-developer-cloud","download_url":"https://codeload.github.com/watson-developer-cloud/assistant-simple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248960744,"owners_count":21189988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:12.552Z","updated_at":"2025-04-14T20:46:58.923Z","avatar_url":"https://github.com/watson-developer-cloud.png","language":"JavaScript","funding_links":[],"categories":["Data \u0026 AI"],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003e🚀 Watson Assistant (formerly Conversation) Sample Application\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eThis Node.js app demonstrates the Watson Assistant service in a simple interface engaging in a series of simple simulated banking tasks.\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://travis-ci.org/watson-developer-cloud/assistant-simple\"\u003e\n    \u003cimg alt=\"Travis\" src=\"https://travis-ci.org/watson-developer-cloud/assistant-simple.svg?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"#badge\"\u003e\n    \u003cimg alt=\"semantic-release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003c/p\u003e\n\n![Demo](readme_images/demo.gif)\n\nYou can view a [demo][demo_url] of this app.\n\nPlease note this app uses the [Watson Assistant V2 API](https://cloud.ibm.com/apidocs/assistant-v2#introduction). To access a version of the V1 app, you can go to [v1.4.1](https://github.com/watson-developer-cloud/assistant-simple/releases/tag/v1.4.1).\n\nIf you need more information about the V1 API, you can go to the [Watson Assistant V1 API page](https://cloud.ibm.com/apidocs/assistant#introduction).\n\n\n## Prerequisites\n\n1. Sign up for an [IBM Cloud account](https://cloud.ibm.com/registration/).\n1. Download the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview).\n1. Create an instance of the Watson Assistant service and get your credentials:\n    - Go to the [Watson Assistant](https://cloud.ibm.com/catalog/services/conversation) page in the IBM Cloud Catalog.\n    - Log in to your IBM Cloud account.\n    - Click **Create**.\n    - Click **Show** to view the service credentials.\n    - Copy the `apikey` value, or copy the `username` and `password` values if your service instance doesn't provide an `apikey`.\n    - Copy the `url` value.\n\n## Configuring the application\n\n1. In your IBM Cloud console, open the Watson Assistant service instance\n\n2. Click the **Import workspace** icon in the Watson Assistant service tool. Specify the location of the workspace JSON file in your local copy of the app project:\n\n    `\u003cproject_root\u003e/training/bank_simple_workspace.json`\n\n3. Select **Everything (Intents, Entities, and Dialog)** and then click **Import**. The car dashboard workspace is created.\n\n4. Click the menu icon in the upper-right corner of the workspace tile, and then select **View details**.\n\n5. Click the ![Copy](readme_images/copy_icon.png) icon to copy the workspace ID to the clipboard.\n\n    ![Steps to get credentials](readme_images/assistant-simple.gif)\n\n6. In the application folder, copy the *.env.example* file and create a file called *.env*\n\n    ```\n    cp .env.example .env\n    ```\n\n7. Open the *.env* file and add the service credentials that you obtained in the previous step. The Watson SDK automatically locates the correct environmental variables for either `username`, `password`, and `url` or the `apikey` and `url` credentials found in the *.env* file.\n\n    Example *.env* file that configures the `apikey` and `url` for a Watson Assistant service instance hosted in the US East region:\n\n    ```\n    ASSISTANT_IAM_APIKEY=X4rbi8vwZmKpXfowaS3GAsA7vdy17Qhxxxxxxxx\n    ASSISTANT_URL=https://gateway-wdc.watsonplatform.net/assistant/api\n    ```\n\n    - If your service instance uses `username` and `password` credentials, add the `ASSISTANT_USERNAME` and `ASSISTANT_PASSWORD` variables to the *.env* file.\n\n    Example *.env* file that configures the `username`, `password`, and `url` for a Watson Assistant service instance hosted in the US South region:\n\n    ```\n    ASSISTANT_USERNAME=522be-7b41-ab44-dec3-xxxxxxxx\n    ASSISTANT_PASSWORD=A4Z5BdGENxxxx\n    ASSISTANT_URL=https://gateway.watsonplatform.net/assistant/api\n    ```\n    However, if your credentials contain an IAM API key, copy the `apikey` and `url` to the relevant fields.\n    ```JSON\n      {\n        \"apikey\": \"ca2905e6-7b5d-4408-9192-xxxxxxxx\",\n        \"iam_apikey_description\": \"Auto generated apikey during resource-key ...\",\n        \"iam_apikey_name\": \"auto-generated-apikey-62b71334-3ae3-4609-xxxxxxxx\",\n        \"iam_role_crn\": \"crn:v1:bluemix:public:iam::::serviceRole:Manager\",\n        \"iam_serviceid_crn\": \"crn:v1:bluemix:public:iam...\",\n        \"url\": \"https://gateway-syd.watsonplatform.net/assistant/api\"\n      }\n    ```\n    ```\n    ASSISTANT_IAM_APIKEY=ca2905e6-7b5d-4408-9192-xxxxxxxx\n    ```\n\n8. Add the `ASSISTANT_ID` to the previous properties\n\n    ```\n    ASSISTANT_ID=522be-7b41-ab44-dec3-xxxxxxxx\n    ```\n\n## Running locally\n\n1. Install the dependencies\n\n    ```\n    npm install\n    ```\n\n1. Run the application\n\n    ```\n    npm start\n    ```\n\n1. View the application in a browser at `localhost:3000`\n\n## Deploying to IBM Cloud as a Cloud Foundry Application\n\n1. Login to IBM Cloud with the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview)\n\n    ```\n    ibmcloud login\n    ```\n\n1. Target a Cloud Foundry organization and space.\n\n    ```\n    ibmcloud target --cf\n    ```\n\n1. Edit the *manifest.yml* file. Change the **name** field to something unique.  \n  For example, `- name: my-app-name`.\n1. Deploy the application\n\n    ```\n    ibmcloud app push\n    ```\n\n1. View the application online at the app URL.  \nFor example: https://my-app-name.mybluemix.net\n\n\n## License\n\nThis sample code is licensed under Apache 2.0.  \nFull license text is available in [LICENSE](LICENSE).\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## Open Source @ IBM\n\nFind more open source projects on the\n[IBM Github Page](http://ibm.github.io/).\n\n\n[demo_url]: https://assistant-simple.ng.bluemix.net/\n[doc_intents]: https://cloud.ibm.com/docs/services/conversation/intents-entities.html#planning-your-entities\n[docs]: https://cloud.ibm.com/docs/services/assistant/index.html#index\n[docs_landing]: (https://cloud.ibm.com/docs/services/assistant/index.html#index)\n[node_link]: (http://nodejs.org/)\n[npm_link]: (https://www.npmjs.com/)\n[sign_up]: https://cloud.ibm.com/registration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fassistant-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatson-developer-cloud%2Fassistant-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fassistant-simple/lists"}