posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.32k stars 82 forks source link

Create an AI Chatbot Example In Python Shiny Gallery #606

Open adejumoridwan opened 1 year ago

adejumoridwan commented 1 year ago

I don't know if it is possible to add a chatbot example in the Shiny documentation gallery. The chatbot will show users how to integrate API with shiny, such as Open AI's API, to create a chatbot.

PARKER-X commented 1 year ago

you can take input from user and then process input I create an ml app not chatbot but idea is similar u can check my shinny project https://github.com/PARKER-X/shinny_ml. You can try to build chatbot example we can help u

jcheng5 commented 1 year ago

Our own @wch has created an extremely easy-to-use chatbot library for Shiny, with some great examples. It can be found here: https://github.com/wch/chatstream

Video demonstration here: https://www.youtube.com/watch?v=0ovCLxttJGE

They are not currently in the example gallery because an OpenAI token is required (i.e. $) and we've all just been using our own personal tokens.

adejumoridwan commented 1 year ago

@jcheng5 should I close the issue then?

jcheng5 commented 1 year ago

Let's leave this open as a reminder that our doc site needs to spotlight/link to the chatstream examples. Thanks!

smach commented 8 months ago

@jcheng5 chatstream is out of date now, it doesn't include changes in the OpenAI API or newer OpenAI models. I'd love to be able to use Shiny Python for my generative AI apps, but it doesn't feel like that use case is a focus for Shiny Python?

jcheng5 commented 8 months ago

Thanks for the heads up, @smach! We took our eye off the ball on this since the release of chatstream but are definitely coming back to chat apps (and LLMs in general) now that Shiny Express has been released.

cc @wch

kovla commented 8 months ago

Seconded. Coming from R Shiny to Python, it would be nice to be able to have ChatGPT-style streaming chat capabilities in the familiar Shiny universe (instead of learning a new framework).