entity - 如何在 API.AI 中添加特殊字符作为实体

标签 entity dialogflow-es

我想在 api.ai 中添加一个以 CSV 格式显示的实体,如下所示 “B@”,“B@”,“银行” 我不断收到错误消息,提示我无法添加此实体。有人知道如何让 API.ai 使用 unicode 或实体中的其他特殊字符吗?

{ id: '3a99a9a7-71f6-4b8b-9c22-8047d8c8ec44',
  timestamp: '2017-12-19T11:24:56.77Z',
  lang: 'en',
  status:
   { code: 400,
     errorType: 'bad_request',
     errorDetails: 'Error parsing Entity \'currencies\': Syntax Error in input \'B@\'. Incorrect token at position 2. Maybe you did not close round, curly or square bracket.',
     webhookTimedOut: false } }

这就是我得到的确切错误,如果我想,我该如何将 B@ 作为实体名称

最佳答案

嗯,奇怪的是 b@ 实体是不允许的,但 b@b 是允许的。由此可见,@ 符号在某种程度上是允许的,但在解析时会被误解。

当我在方括号内包含@的html unicode - b[U+0040]和b[@的html Unicode]作为实体时,如下所示,它触发了相应的实体。

Add html uicode inside square brackets

我也在后端 webhook 中收到了。对于符号的 unicode,请点击此链接 https://unicode-table.com/

Webhook

您也可以使用 @sys.any 执行此操作,而无需创建实体并在 webhook 上验证它是否为 b@,但我认为这是一种低效的方式。

关于entity - 如何在 API.AI 中添加特殊字符作为实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44732108/

相关文章:

entity-framework - EF Code First 4.1 - 如何配置默认的一对多关系

java - 删除一对多关系中的实体

dialogflow-es - 带有 Webhook 客户端 : Error agent. getContext 的 DialogFlow 不是 IncomingMessage.resp 中的函数

node.js - 谷歌模拟器上的操作不分离屏幕输出设备

botframework - Google Dialogflow 中的 Multi-Tenancy

node.js - 在 Firebase 的 Node.js 中获取谷歌用户 ID 用于助手应用程序

hibernate - 领域驱动设计 - 领域模型与 Hibernate 实体

symfony - "invalid entities"有什么危害?

c++ - 3D vector (X、Y、Z)查看 vector

node.js - 使用云函数模拟器在本地测试 Dialogflow 实现