cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

No Suggestions after uploading expressions through API

brunotrie
Explorer
0 Kudos
516

Hello,

I have many expressions, which I uploaded through the API. Unfortunately no suggestions/examples are made/shown for more similar expressions by SAP CAI.

Instead, if I would write every single expression manually into the intent, many suggestions for more expressions are made by SAP CAI. Because of the big amount of expressions and intents this process would take too long .

Is there a possibility to upload expressions through the API and also get suggestions for similar expressions by SAP CAI?

Thanks in advance.

Regards,

Bruno

View Entire Topic
former_member523146
Participant
0 Kudos

Hi,

the upload functionality does not automatically trigger the generation of suggestions as it assumes that you'll have enough expressions in the csv file you upload. If you anyways want to generate suggestions, you have two options:

a) Call the bot's generation API:

curl --location --request POST 'https://cai.tools.sap/public/api/train/v2/users/<bot_owner_slug>/bots/<bot_slug>/versions/<version_slug>/dataset/intents/<intent_slug>/expressions/<id of any expression>/generate' \
--header 'X-Token: Token <Bot dev token>' \
--header 'Authorization: Bearer <Design-time OAuth token>'

b) Add another expression to the intent via the UI after you uploaded the csv file. This will automatically trigger the generation of more suggestions. You can remove the expressions afterwrds again.

brunotrie
Explorer
0 Kudos

Thank you very much.