连接到dialogflow.com api v2的rasa_核心解释器
rasa-dialogflow-interpreter的Python项目详细描述
rasa dialogflow解释器
rasa_core interpreter connecting to dialogflow.com API v2
一个rasa_core
Interpreter,它从dialogflow.com api v2中获取意图数据。这意味着您可以运行rasa_core
,并使用dialogflow进行自然语言理解。
安装
使用pip安装:
pip install rasa-dialogflow-interpreter
用法
fromrasa_dialogflow_interpreter.interpreterimportDialogflowInterpreterfromrasa_core.agentimportAgentagent=Agent.load('path/to/dialogue/models',interpreter=DialogflowInterpreter('dialogflow-project-name',# if you omit the `service_account_json` parameter the value# exported to GOOGLE_APPLICATION_CREDENTIALS will be used insteadservice_account_json='dialogflow-project-name.json',))msg=agent.handle_text('What does it all mean, Dialogflow?')
注意,由于dialogflow当前的工作方式,返回的entities
将没有start
和end
值。
许可证
麻省理工学院Frederik Ring