action 终端输出:
(py385forQA) D:\1.Workstation\VSCodeProject\5.MedicalQA\Doctor-Friende\chat>rasa run actions --actions MyActions.actions --cors "" -vv
2022-07-24 17:17:47 INFO rasa_sdk.endpoint - Starting action endpoint server...
2022-07-24 17:17:47 DEBUG py2neo.client - Acquiring connection from pool <DirectConnectionPool profile=ConnectionProfile('bolt://[email protected]:7687') in_use=0 free=0 spare=100>
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#0000] C: (Dialing <127.0.0.1:7687>)
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] S: (Accepted)
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] C:
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] C: 4.0 | 3.0 | 2.0 | 1.0
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] S: 3.0
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] C: HELLO {'user_agent': 'py2neo/2020.0.0 Python/3.8.5-final-0 (win32)', 'scheme': 'basic', 'principal': 'neo4j', 'credentials': '******'}
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] C: (Sent 112 bytes)
2022-07-24 17:17:47 DEBUG py2neo.client.bolt - [#D717] S: SUCCESS {'server': 'Neo4j/3.5.34', 'connection_id': 'bolt-479'}
2022-07-24 17:17:47 DEBUG py2neo.client - Releasing connection <py2neo.client.bolt.Bolt3 object at 0x000001F678FF6E50>
2022-07-24 17:17:47 DEBUG MyActions.actions - Neo4j Database connected successfully.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_echo'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_first'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_donknow'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_treat'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_food'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_symptom'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_cause'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_neopathy'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_drug'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_prevention'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_drug_func'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_disease_treat_time'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_easy_get'.
2022-07-24 17:17:47 INFO rasa_sdk.executor - Registered function for 'action_search_disease_dept'.
2022-07-24 17:17:47 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://localhost:5055
2022-07-24 17:17:47 DEBUG rasa_sdk.utils - Using the default number of Sanic workers (1).
rasa shell终端输出:
(py385forQA) D:\1.Workstation\VSCodeProject\5.MedicalQA\Doctor-Friende\chat>rasa shell -m models/medicalRasa2/20201108-200002.tar.gz --endpoints config/endpoints.yml -vv
2022-07-24 17:18:45 DEBUG rasa.model - Extracted model to 'C:\Users\26282\AppData\Local\Temp\tmp7gqspun1'.
2022-07-24 17:18:46 DEBUG rasa.model - Extracted model to 'C:\Users\26282\AppData\Local\Temp\tmp2vnbtfv2'.
2022-07-24 17:18:47 DEBUG sanic.root - CORS: Configuring CORS with resources: {'/': {'origins': [''], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.'], 'expose_headers': 'filename', 'supports_credentials': True, 'max_age': None, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': {'/': {'origins': ''}}, 'intercept_exceptions': True, 'always_send': True}}
2022-07-24 17:18:47 DEBUG rasa.core.utils - Available web server routes:
/webhooks/rest GET custom_webhook_CmdlineInput.health
/webhooks/rest/webhook POST custom_webhook_CmdlineInput.receive
/ GET hello
2022-07-24 17:18:47 INFO root - Starting Rasa server on http://localhost:5005
2022-07-24 17:18:47 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2022-07-24 17:18:47 DEBUG rasa.model - Extracted model to 'C:\Users\26282\AppData\Local\Temp\tmpipwivuhn'.
2022-07-24 17:18:48 INFO root - Enabling coroutine debugging. Loop id 1938098957856.
2022-07-24 17:18:48 DEBUG rasa.model - Extracted model to 'C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n'.
2022-07-24 17:18:51 INFO rasa.nlu.components - Added 'MitieNLP' to component cache. Key 'MitieNLP-D:\1.Workstation\VSCodeProject\5.MedicalQA\Doctor-Friende\chat\data\total_word_feature_extractor_zh.dat'.
2022-07-24 17:18:51 INFO rasa.nlu.tokenizers.jieba_tokenizer - Loading Jieba User Dictionary at C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Departments_dic.txt
Building prefix dict from the default dictionary ...
2022-07-24 17:18:51 DEBUG jieba - Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\26282\AppData\Local\Temp\jieba.cache
2022-07-24 17:18:51 DEBUG jieba - Loading model from cache C:\Users\26282\AppData\Local\Temp\jieba.cache
Loading model cost 0.601 seconds.
2022-07-24 17:18:52 DEBUG jieba - Loading model cost 0.601 seconds.
Prefix dict has been built successfully.
2022-07-24 17:18:52 DEBUG jieba - Prefix dict has been built successfully.
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\nlu\tokenizers\jieba_tokenizer.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Departments_dic.txt'>
jieba.load_userdict(jieba_userdict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-07-24 17:18:52 INFO rasa.nlu.tokenizers.jieba_tokenizer - Loading Jieba User Dictionary at C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Diseases_dic.txt
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\nlu\tokenizers\jieba_tokenizer.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Diseases_dic.txt'>
jieba.load_userdict(jieba_userdict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-07-24 17:18:52 INFO rasa.nlu.tokenizers.jieba_tokenizer - Loading Jieba User Dictionary at C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Drugs_dic.txt
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\nlu\tokenizers\jieba_tokenizer.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Drugs_dic.txt'>
jieba.load_userdict(jieba_userdict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-07-24 17:18:52 INFO rasa.nlu.tokenizers.jieba_tokenizer - Loading Jieba User Dictionary at C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Foods_dic.txt
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\nlu\tokenizers\jieba_tokenizer.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Foods_dic.txt'>
jieba.load_userdict(jieba_userdict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-07-24 17:18:52 INFO rasa.nlu.tokenizers.jieba_tokenizer - Loading Jieba User Dictionary at C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Symptoms_dic.txt
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\nlu\tokenizers\jieba_tokenizer.py:62: ResourceWarning: unclosed file <_io.BufferedReader name='C:\Users\26282\AppData\Local\Temp\tmpmhqhkf0n\nlu\component_1_JiebaTokenizer\Symptoms_dic.txt'>
jieba.load_userdict(jieba_userdict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2022-07-24 17:18:52 DEBUG rasa.core.tracker_store - Attempting to connect to database via 'mysql+mysqldb://root:**@localhost:3306/rasaforqa'.
2022-07-24 17:18:52 DEBUG rasa.core.tracker_store - Connection to SQL database 'rasaforqa' successful.
2022-07-24 17:18:52 DEBUG rasa.core.tracker_store - Connected to SQLTrackerStore.
2022-07-24 17:18:52 DEBUG rasa.core.lock_store - Connected to lock store 'InMemoryLockStore'.
2022-07-24 17:18:52 DEBUG rasa.model - Extracted model to 'C:\Users\26282\AppData\Local\Temp\tmpocowudb7'.
2022-07-24 17:18:52 DEBUG rasa.utils.tensorflow.models - Loading the model ...
2022-07-24 17:18:53 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2022-07-24 17:18:53 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph...
2022-07-24 17:18:55 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph.
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\core\policies\mapping_policy.py:51: FutureWarning: 'MappingPolicy' is deprecated and will be removed in the future. It is recommended to use the 'RulePolicy' instead. (will be removed in 3.0.0)
rasa.shared.utils.io.raise_deprecation_warning(
C:\Users\26282\miniconda3\envs\py385forQA\lib\site-packages\rasa\core\policies\fallback.py:64: FutureWarning: 'FallbackPolicy' is deprecated and will be removed in the future. It is recommended to use the 'RulePolicy' instead. (will be removed in 3.0.0)
rasa.shared.utils.io.raise_deprecation_warning(
2022-07-24 17:18:55 DEBUG rasa.core.nlg.generator - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
2022-07-24 17:18:55 INFO root - Rasa server is up and running.
Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input ->
前端控制台输出: