https://github.com/ekylibre/ekylibre-duke
https://github.com/ekylibre/ekylibre-duke
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ekylibre/ekylibre-duke
- Owner: ekylibre
- Created: 2023-05-05T12:58:52.000Z (about 2 years ago)
- Default Branch: 134-indicateur-a3-item-1-et-2
- Last Pushed: 2023-08-03T17:08:11.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T01:46:43.824Z (4 months ago)
- Language: Ruby
- Size: 1010 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duke
Gem to import Duke methods and webchat for an Ekylibre farm.
Duke currently handles harvest receptions (viti) and vegetal/viti interventions## Installation
Add this line to your application's Gemfile:
```
gem 'duke', git: '[email protected]:ekylibre/ekylibre-duke.git', branch: 'dev' # for dev branch
gem 'duke', git: '[email protected]:ekylibre/ekylibre-duke.git', branch: 'master' # for prod branch
gem 'duke', path: '../ekylibre-duke' # for local dev
```
And then execute:
```
$ bundle
```
Create an account for external API usesThese steps are only to be done if you’re not part of Ekylibre developers
## IBM cloud
a. Create a new instance of Watson-Assistant & a new assistant (3 month free)
b. Clone Gitlab ekylibre-duke repo
c. On your newly created assistant, import skill from
If you change skills on IBM Watson, you have to backup all skills and save it into `ekylibre-duke.json`
```
ekylibre-duke/skills/ekylibre-duke.json
```## Azure Cloud (STT)
Create a new cognitive resource & enable Speech services & store keys
## Ensure your environments variables are defined
Ekylibre uses dotenv locally.
```
$ touch .env (at the root of your ekylibre clone)
```
Add following environment variables
```
WATSON_APIKEY=YOUR_WATSON_API_KEY
WATSON_URL=YOUR_WATSON_URL
WATSON_VERSION=YOUR_WATSON_VERSION
WATSON_EKYVITI_ID=YOUR_ASSISTANT_ID
AZURE_API_KEY=YOUR_AZURE_API_KEY
AZURE_REGION=YOUR_AZURE_REGION
```
4. Redirect your IBM webhooks requests to your ekylibre serverLocally :
Install ngrok & execute below command:
```
$ ./ngrok http -host-header=TENANT.ekylibre.lan PORT
```Example 1 : ./ngrok http -host-header=demo.ekylibre.lan 3000
Example 2 : ./ngrok http -host-header=entredeuxterres.ekylibre.lan 3000
Then go locally inside your Gem to app/controllers/duke/duke_webchat_controller.rb and change your user_url line 36 in the user_defined method with
user_url: "https://YOUR_NGROK_HTTPS_URL/dukewatson"
instead of
user_url: "#{request.protocol}#{request.host}/dukewatson"
## Contributing
Bug reports and pull requests are welcome on GitHub in [this repository](https://gitlab.com/ekylibre/ekylibre-duke)