diff --git a/docker/virtual-patient-rasa-manager/docs/docker-entrypoint.sh b/docker/virtual-patient-rasa-manager/docs/docker-entrypoint.sh new file mode 100644 index 00000000..17d188ee --- /dev/null +++ b/docker/virtual-patient-rasa-manager/docs/docker-entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# 启动text2vec服务 +source /root/anaconda3/etc/profile.d/conda.sh && \ + conda activate text2vec_env && \ + nohup python /usr/local/text2vec/app.py & + +# 启动jar包 +java -jar -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -Xms256m -Xmx1g /data/vp/virtual-patient-rasa-1.0-SNAPSHOT.jar "$@" \ No newline at end of file diff --git a/docker/virtual-patient-rasa-manager/docs/rasa/config-local.yml b/docker/virtual-patient-rasa-manager/docs/rasa/config-local.yml new file mode 100644 index 00000000..c61381ea --- /dev/null +++ b/docker/virtual-patient-rasa-manager/docs/rasa/config-local.yml @@ -0,0 +1,29 @@ + +recipe: default.v1 +language: zh + +pipeline: + - name: JiebaTokenizer + - name: LanguageModelFeaturizer + model_name: "bert" + model_weights: "/rasa/bert-base-chinese" + - name: RegexFeaturizer + - name: DIETClassifier + epochs: 100 + learning_rate: 0.001 + tensorboard_log_directory: ./log + - name: ResponseSelector + epochs: 100 + learning_rate: 0.001 + - name: FallbackClassifier + threshold: 0.4 + ambiguity_threshold: 0.1 + - name: EntitySynonymMapper + +policies: + - name: MemoizationPolicy + - name: TEDPolicy + - name: RulePolicy + core_fallback_threshold: 0.4 + core_fallback_action_name: "action_default_fallback" + enable_fallback_prediction: True diff --git a/docker/virtual-patient-rasa-manager/docs/rasa/config.yml b/docker/virtual-patient-rasa-manager/docs/rasa/config.yml new file mode 100644 index 00000000..ad3057e3 --- /dev/null +++ b/docker/virtual-patient-rasa-manager/docs/rasa/config.yml @@ -0,0 +1,29 @@ + +recipe: default.v1 +language: zh + +pipeline: + - name: JiebaTokenizer + - name: LanguageModelFeaturizer + model_name: bert + model_weights: bert-base-chinese + - name: RegexFeaturizer + - name: DIETClassifier + epochs: 100 + learning_rate: 0.001 + tensorboard_log_directory: ./log + - name: ResponseSelector + epochs: 100 + learning_rate: 0.001 + - name: FallbackClassifier + threshold: 0.87 + ambiguity_threshold: 0.1 + - name: EntitySynonymMapper + +policies: + - name: MemoizationPolicy + - name: TEDPolicy + - name: RulePolicy + core_fallback_threshold: 0.87 + core_fallback_action_name: "action_default_fallback" + enable_fallback_prediction: True diff --git a/docker/virtual-patient-rasa-manager/docs/rasa/credentials.yml b/docker/virtual-patient-rasa-manager/docs/rasa/credentials.yml new file mode 100644 index 00000000..e9f12911 --- /dev/null +++ b/docker/virtual-patient-rasa-manager/docs/rasa/credentials.yml @@ -0,0 +1,33 @@ +# This file contains the credentials for the voice & chat platforms +# which your bot is using. +# https://rasa.com/docs/rasa/messaging-and-voice-channels + +rest: +# # you don't need to provide anything here - this channel doesn't +# # require any credentials + + +#facebook: +# verify: "" +# secret: "" +# page-access-token: "" + +#slack: +# slack_token: "" +# slack_channel: "" +# slack_signing_secret: "" + +#socketio: +# user_message_evt: +# bot_message_evt: +# session_persistence: + +#mattermost: +# url: "https:///api/v4" +# token: "" +# webhook_url: "" + +# This entry is needed if you are using Rasa Enterprise. The entry represents credentials +# for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers. +rasa: + url: "http://localhost:5002/api" diff --git a/docker/virtual-patient-rasa-manager/docs/rasa/endpoints.yml b/docker/virtual-patient-rasa-manager/docs/rasa/endpoints.yml new file mode 100644 index 00000000..c896a6e0 --- /dev/null +++ b/docker/virtual-patient-rasa-manager/docs/rasa/endpoints.yml @@ -0,0 +1,51 @@ +# This file contains the different endpoints your bot can use. + +# Server where the models are pulled from. +# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server + +#models: +# url: http://my-server.com/models/default_core@latest +# wait_time_between_pulls: 10 # [optional](default: 100) + +# Server which runs your custom actions. +# https://rasa.com/docs/rasa/custom-actions + +action_endpoint: + url: "http://127.0.0.1:5055/webhook" + +# Tracker store which is used to store the conversations. +# By default the conversations are stored in memory. +# https://rasa.com/docs/rasa/tracker-stores + +#tracker_store: +# type: redis +# url: +# port: +# db: +# password: +# use_ssl: + +#tracker_store: +# type: mongod +# url: +# db: +# username: +# password: + + +#tracker_store: +# type: mongod +# url: mongodb://192.168.10.137:27017 +# db: dialog_test +# username: +# password: + + +# Event broker which all conversation events should be streamed to. +# https://rasa.com/docs/rasa/event-brokers + +#event_broker: +# url: localhost +# username: username +# password: password +# queue: queue diff --git a/virtual-patient-rasa/docs/rasa/endpoints.yml b/virtual-patient-rasa/docs/rasa/endpoints.yml index 25cb5b66..c896a6e0 100644 --- a/virtual-patient-rasa/docs/rasa/endpoints.yml +++ b/virtual-patient-rasa/docs/rasa/endpoints.yml @@ -11,7 +11,7 @@ # https://rasa.com/docs/rasa/custom-actions action_endpoint: - url: "http://192.168.10.137:5055/webhook" + url: "http://127.0.0.1:5055/webhook" # Tracker store which is used to store the conversations. # By default the conversations are stored in memory.