1

目前我有两个故事。像这样的东西:

Story #1
User: How much is Widget X 2000?
Bot: It costs $30.

Story #2
User: Where can I buy Widget X 2000?
Bot: At your local Best Buy.

问题:如果用户触发了故事#1,他们仍然必须明确说出产品的名称(而不是)才能触发故事#2。这就是发生的事情:

User: How much is Widget X 2000?
Bot: It costs $30.
User: Where can I buy it?
--error--

这些答案不应该组合成一个故事,因为问题的顺序永远不会相同。Wit.Ai 能以某种方式理解代词吗?

4

2 回答 2

1

Wit.ai 目前不提供自动代词解析。

通常,您应该使用上下文来存储用户正在谈论的产品,例如:

User: How much is Widget X 2000?
Bot-action: context.item = "Widget X 2000"
Bot-send: It costs $30.
User: Where can I buy it?
[here the next bot action will use context.item if no item entity is detected in the sentence]
于 2016-11-07T04:48:09.007 回答
0

问题是您没有使用任何上下文,因此代理无法将“它”与“Widget X 2000”相关联。

于 2016-10-20T13:42:29.410 回答