dangerimp
dangerimp

Reputation: 11

WIT.AI: Switching between stories

I'm trying to do a simple story that would go something like this:

U: What's the stock symbol for Google?
A: The stock symbol for Google is GOOGL.
U: Give me a stock quote.
A: The current price for GOOGLE is 796.95.

But I'd also like the user to be able to do:

U: Give me a stock quote for GOOGL.
A: The current price for GOOGLE is 796.95.

In addition, I'd like the user to be able to use shorthand and shorten the above to:

U: symbol google
A: The stock symbol for Google is GOOGL.
U: quote
A: The current price for GOOGLE is 796.95.

and

U: quote GOOGL
A: The current price for GOOGLE is 796.95.

or

U: GOOGL quote 
A: The current price for GOOGLE is 796.95.

and also: U: quote A: What symbol would you like a quote for? U: GOOGL A: The current price for GOOGLE is 796.95.

But I can't seem to find a way of structuring the above without WIT.AI freaking out or producing outputs that just dont' work.

I'd paste in some of the iterations I'd try but it's challenging with a UI front end and non-concise code output.

Thanks in advance.

Upvotes: 1

Views: 343

Answers (1)

dangerimp
dangerimp

Reputation: 11

I was able to get this working by adding both an "intent" and "verb". Additionally, I avoided trying to train the "quote" by itself use case.

Upvotes: 0

Related Questions