wit icon indicating copy to clipboard operation
wit copied to clipboard

Entity expressions are not returned

Open s-nour opened this issue 8 years ago • 15 comments

Please check the following: When requesting the entity expressions through API, they are always returned empty image

However, I can see them on Wit.ai

image

s-nour avatar Jan 30 '18 07:01 s-nour

Can you share your app id?

l5t avatar Jan 30 '18 16:01 l5t

Hey @s-nour

Two issues:

re: errors where the "intent" entity gives you warnings

  • It looks like "start" and "end" values are provided for some samples. Could you send me an example curl for them?
    • For trait entities, they should not contain a start and end, as they consider the whole sentence

re: issues with GET /entity/:id

Here, the terminology is a bit confusing.

  • expressions in those case refer to synonyms for free-text and keyword entities. In this case, as this is a trait entity, there are no synonyms
  • We are thinking through a GET /samples api, that may help. If you need this urgently, let us know and we can give you a temporary solution

stopachka avatar Feb 04 '18 01:02 stopachka

@stopachka Hello, I need this as well. We are trying to provide a convenient way of training and management, sort of a copy of Wit UI. I need to display all expressions of all values of an intent, but all I get is empty arrays. I use trait lookup as well, all the same as author. Look at my app mbukovy/10-12-prvy, I need to see this expressions and be able to delete them as well (see the picture)

Is it possible or is it going to be implemented in the near future? Thank you!

untitled

mbukovy avatar Feb 05 '18 14:02 mbukovy

The main issue here is that we were previously able to obtain expressions of trait entity values, and we are still able to on apps created before January 28th. The expressions are returned as an empty array for apps created after the mentioned date.

s-nour avatar Feb 06 '18 07:02 s-nour

Well, we're going to create apps dynamically through the API, so... :-) But that's a very strange behavior, why is that?

I don't have an experience with Wit.ai before January 28th, so I just know, that I can't get the expressions I see in Wit UI.

mbukovy avatar Feb 06 '18 08:02 mbukovy

@stopachka I've got the access to one older app and exactly as @s-nour states, it's working great. Exactly as I want. Please, write here a status - is it going to be fixed, or implemented other way and when can we expect it?

Thank you!

mbukovy avatar Feb 07 '18 16:02 mbukovy

Very interesting

@s-nour @mbukovy

  • could you give me an app id of one the apps, where this works?
  • (alongside the request you are making, without the access token)

re: fully-featured samples api -- this is definitely a contender for an upcoming api update. Will let you know how it goes

stopachka avatar Feb 08 '18 21:02 stopachka

@stopachka Interesting, now it doesn't work with an older app either. But I'm sure, it worked with this request GET https://api.wit.ai/entities/intent Now it returns empty arrays for expressions. I was able to see the expressions array and add/delete them with requests POST entities/intent/values and DELETE /entities/intent/values/phone_problem/expressions/Oh my god my phone

I was trying this older app 5a2193c5-e96f-4f85-9c97-1b95d869551e (it worked, now it doesn't) and this newer app 5a78465c-0604-4adf-a6e1-b5ae9bd9a1f5 (doesn't work)

mbukovy avatar Feb 09 '18 08:02 mbukovy

i'm having this issue as well. has anyone found a fix for this problem?

I can confirm that this seems to be an issue with only trait-type entities!

josephlingzb avatar Feb 09 '18 09:02 josephlingzb

Here's the response returned for a previously working app from our logs: Response:{ "builtin" : false, "doc" : "User-defined entity", "exotic" : false, "id" : "59997b65-563c-4f25-8672-ccb2b2cf4297", "lang" : "en", "lookups" : [ "trait" ], "name" : "intent", "values" : [ { "value" : "Car Deals", "expressions" : [ "can you give me car deals", "do you have car deals", "i am looking for a car" ] }, { "value" : "Loans", "expressions" : [ "i need a car loan", "car loans" ] } ] } DateTime: 1/31/2018 1:10:44 PM

I can send you more samples from our logs if you'd like.

And this is the response for an app that still returns trait expressions:

App ID: 5a16b0bf-bdd7-4a24-8fe1-f81fbce086fb wit2

91ns avatar Feb 09 '18 12:02 91ns

@stopachka is there any way to get expressions of a trait using the API right now? This used to work until recently.

The problem is that we are using the APIs in our own UI to handle training of the bot, and now that none of the expressions are being returned, we are unable to continue doing so.

Here's one of our app-ids that stopped working: 59f6f0e3-2844-40d6-b9ee-599712584c67

josephlingzb avatar Feb 11 '18 01:02 josephlingzb

Thanks for your patience, I'm working on a fix.

patapizza avatar Feb 14 '18 14:02 patapizza

This should now be fixed - can someone confirm?

patapizza avatar Feb 14 '18 21:02 patapizza

Just tested, this is now working. Thanks!

josephlingzb avatar Feb 15 '18 00:02 josephlingzb

I can confirm it's working as well, thank you very much.

s-nour avatar Feb 15 '18 10:02 s-nour