chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Are there client-side actions?

Open bleonard opened this issue 1 year ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe.

Overall, I am creating a co-pilot for an interface. I would like to use OpenAI assistant to help them. It's possible that the copilot will want to effect the user's app. I'm thinking about a messaging having a "Do it" button next to it, which does something in the UI. Basically , it runs JS I specify.

Describe the solution you'd like

As far as I can tell, the only current Action is to POST to an endpoint. That can then return a string for a toast.

I'd like for a client to declare what actions are available, likely registering callbacks. Then it would be possible for these to get called from a button.

Ideally, the server will know what's available and not suggest anything that the app does not know how to do.

Is something like this possible now?

bleonard avatar Jul 18 '24 21:07 bleonard