Add uttrances in CLU Cognitive Services

Adarsh Pandey 21 Reputation points
2022-12-12T13:49:26.57+00:00

Hi Team,

I do see we can add Phrases in LUIS via this API endpoint: https://learn.microsoft.com/en-us/rest/api/cognitiveservices-luis/authoringv2.0/features/add-phrase-list?tabs=HTTP

As I am planning to migrate LUIS to CLU we've to rewrite the APIs to send the Phrases details in CLU (As phrases is not in CLU, I understand they'll go as utterances).

Is there any way in CLU to add utterances via API endpoint? I do see we've a screen in CLU to upload the utterances file in one go but is this possible to do programmatic way via CLU APIs ?

Any response would be much appreciated.

Thanks,
Adarsh

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,415 questions
{count} votes

Accepted answer
  1. romungi-MSFT 42,311 Reputation points Microsoft Employee
    2022-12-22T10:36:56.02+00:00

    @AdarshPandey-2727 The upload functionality from the UI is actually using the file and the import API but it is also internally using the export API to export the project and appending the file selected in the import API request. This effectively is editing the data although the project is just being overwritten.

    So, for example, if we have a project with 20 intents and 100 utterances, to programmatically add 200 more utterances:

    1. Export JSON
    2. Edit JSON to append 200 more utterances
    3. Import JSON again, then same project will now have 20 intents and 300 utterances.

    I hope this helps!!

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful