wit icon indicating copy to clipboard operation
wit copied to clipboard

PUT /entities/intent doesn't update expressions

Open kumangxxx opened this issue 8 years ago • 31 comments

Do you want to request a feature, report a bug, or ask a question about wit? bug

What is the current behavior? expressions not updated

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

curl -X PUT \
  'https://api.wit.ai/entities/intent?v=31/08/2017' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: ac5f5491-3ccb-426e-adea-62414742a30a' \
  -d '{
  "values": [
    {
      "value": "Find Attraction",
      "expressions": [
        "where is the zoo ?"
      ]
    }
  ]
}'

then call GET

curl -X GET \
  'https://api.wit.ai/entities/intent?v=31/08/2017' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: c7fc0f19-4675-461e-83b5-6d87f78f231e'

What is the expected behavior? expressions updated

What is the App ID where you are experiencing this issue (if applicable)? 5a43278b-a214-47d3-975c-ea20ff4c2fc6

this one is very similar with my previous issue, just different app, and since i cannot re-open my last issue, so here i am

kumangxxx avatar Nov 06 '18 01:11 kumangxxx

hi @kumangxxx, can you let me know what steps caused you to be in this state? i just tried the exact curls from above on my own app, and they worked as expected

jtliao avatar Nov 06 '18 06:11 jtliao

@jtliao im not sure, we never do anything fancy, we only do PUT /intent and GET /message

ya, looks like new app work just fine but a lot of my old apps suddenly have this issue

kumangxxx avatar Nov 07 '18 06:11 kumangxxx

Hey @kumangxxx

By have this issue, do you mean that

  1. new curl requests do not update the example sentences
  2. that the existing sentences, are incorrectly labeled

If it's 1), please ping the app-id and example curl that is not working. If it's 2), this is expected, as previous updates may have put the app in an inconsistent state. Here, you would need to send an update once more, to set the correct samples

stopachka avatar Nov 07 '18 22:11 stopachka

hi @stopachka

its 1. app-id = 5a43278b-a214-47d3-975c-ea20ff4c2fc6

kumangxxx avatar Nov 09 '18 03:11 kumangxxx

Hey @kumangxxx -- we will look into this. If you could give an example of a curl on that app, what you expected to update, and what did not update, that would be helpful.

You can email it to stopachka at fb .com

stopachka avatar Nov 12 '18 16:11 stopachka

@stopachka email sent

kumangxxx avatar Nov 13 '18 02:11 kumangxxx

Hi @kumangxxx, can you give it another shot and see if it works? Unfortunately, your app was in a bad state which required some manual fixes.

jtliao avatar Nov 21 '18 00:11 jtliao

Hi @jtliao

i tried, the first call to GET api worked, it returned some intents then i called the PUT api again, then it doesnt work again

kumangxxx avatar Nov 21 '18 06:11 kumangxxx

here's the PUT api

curl -X PUT \
  'https://api.wit.ai/entities/intent?v=31/08/2017' \
  -H 'Authorization: Bearer P33SHN6AHAILHMRFUCOOGI4VJVD3MIPY' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 9a783f66-e25c-4091-bffb-93860afbb121' \
  -d '{
  "values": [
    {
      "value": "Find Attraction",
      "expressions": [
        "where is the zoo ?"
      ]
    }
  ]
}'

kumangxxx avatar Nov 21 '18 06:11 kumangxxx

I currently see that the expressions are updated

jtliao avatar Nov 21 '18 06:11 jtliao

does it takes time to update ? i just sent

{
  "values": [
    {
      "value": "Find Attraction",
      "expressions": [
        "where is the zoo ?",
        "i want to go swimming!"
      ]
    }
  ]
}

the GET result is still like this

{
    "builtin": false,
    "name": "intent",
    "doc": "User-defined entity",
    "id": "5a43278b-0b97-4b9e-be26-93723a1374ca",
    "lang": "en",
    "lookups": [
        "trait"
    ],
    "values": [
        {
            "value": "Find Attraction",
            "expressions": [
                "where is the zoo ?"
            ]
        }
    ]
}

so the issue is fixed manually ? the thing is there are a lot of my apps that have similar issue, so there is nothing i can do to fix it by myself ? or to prevent it ?

kumangxxx avatar Nov 21 '18 14:11 kumangxxx

it does take time, but it shouldn't take very long-- though if you send a GET request immediately after the PUT, it probably wouldn't be done yet. However, I don't see any logs of the below value being sent:

{
      "value": "Find Attraction",
      "expressions": [
        "where is the zoo ?",
        "i want to go swimming!"
      ]
}

Unfortunately I do need to fix your apps manually, so I'd recommend creating new apps to fix the issue since your apps seem to be fairly small, or letting me know the app ids of those that don't work correctly.

jtliao avatar Nov 21 '18 16:11 jtliao

I also found this problem with my app now... It seems like if I PUT small amount of intent's expressions, it's work fine but not when I increase number of expressions(just around 600). This process used to be worked in a few months ago.

my app ID is 65aab071-6bbf-40f9-ce65-cff4309e6bbds

PitichatS avatar Nov 29 '18 03:11 PitichatS

hi @PitichatS, I can't find any app with that ID, can you confirm that's the correct one? And what is the exact issue you're facing, the expressions aren't updated, or the request fails completely?

jtliao avatar Nov 29 '18 06:11 jtliao

Hi Jason,

Sorry I’ve already changed that app to be visibled. Can you try again?

Best Regards, Pitichat Suttaroj

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


จาก: Jason Liao [email protected] ส่ง: Thursday, November 29, 2018 1:05:24 PM ถึง: wit-ai/wit สำเนาถึง: PitichatS; Mention ชื่อเรื่อง: Re: [wit-ai/wit] PUT /entities/intent doesn't update expressions (#1261)

hi @PitichatShttps://github.com/PitichatS, I can't find any app with that ID, can you confirm that's the correct one?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/wit-ai/wit/issues/1261#issuecomment-442717292, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AbtVAiLeoTMWCxFvxDpUUPE_pQ9kbO-Zks5uz3kkgaJpZM4YPmsz.

PitichatS avatar Nov 29 '18 06:11 PitichatS

hi @PitichatS, I can't find any app with that ID, can you confirm that's the correct one? And what is the exact issue you're facing, the expressions aren't updated, or the request fails completely?

The response was returned 200 completely, intents labelled already shown in app but the expressions aren't updated.

PitichatS avatar Nov 29 '18 06:11 PitichatS

The visibility shouldn't matter, there aren't any apps with that app ID

jtliao avatar Nov 29 '18 06:11 jtliao

The visibility shouldn't matter, there aren't any apps with that app ID

I've got it... my app ID is 65aab071-6bbf-40f9-ce65-cff4309e6bbd

PitichatS avatar Nov 29 '18 06:11 PitichatS

Looking into it

jtliao avatar Nov 29 '18 21:11 jtliao

Looking into it

Hi @jtliao. If you have any progress please let me know... It seems that expressions still not updated when I try to PUT them again today.

PitichatS avatar Dec 04 '18 07:12 PitichatS