botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
69 stars 83 forks source link

Override Text Limit for ConverseAPI #783

Closed raphaelsilvasage closed 4 years ago

raphaelsilvasage commented 5 years ago

Hi

Is there a way to override the text size limit of 360 chars for the ConverseAPI?

I`ve implemented my own view for the chat, and the converse API there is no option to add a "custom payload", but I need to send two specific "access tokens" for a particular api, so my solution was to write a custom action that receives this access tokens as a message.

But, the message has this 360 chars limit.

Please advise

many thanks

Raphael

allardy commented 5 years ago

Hello @raphaelsilvasage , converse does have some limitation (can't handle proactive messages). Also, the 360 chars limit is hardcoded at the moment and can't be changed

I'm not sure of what your requirements are for your access tokens, but you can always use a workaround for that using a custom endpoint. Here's an example: https://github.com/botpress/botpress/blob/master/modules/builtin/src/hooks/after_server_start/.expose_private_api.js

You can then call that endpoint from your view and pass accessTokens (with the identity of your user, eg the target), and store in the KVS for next calls

raphaelsilvasage commented 5 years ago

Ok, thanks!

I`ll study this example provided.

Any chances do allow the capability of sending a custom payload for the POST Converse API?

allardy commented 5 years ago

If you are willing to open a PR and test to make sure it works, we may consider accepting it in a patch

allardy commented 4 years ago

Converse length can now be configured https://github.com/botpress/botpress/releases/tag/v12.1.5