Рет қаралды 2,604
In this video, we build a basic chatbot app using the OpenAI API and Shiny. The app allows you to select a model (gpt-3.5-turbo or gpt-4), choose a task/prompt for the model, enter a message, and get a response. I walk through creating inputs (text area, select inputs, action button), storing the message history in a reactive value, calling the OpenAI API with our helper functions, and displaying the responses. We also add a nice theme to polish it off. Overall, this gives you an idea of how to start building your own chatbot apps with OpenAI and Shiny!
Link to code: github.com/jam...
Shiny: shiny.posit.co/
{bslib}: rstudio.github...
Mastering Shiny: mastering-shin...
OpenAI API Documentation: platform.opena...
Tags: #r #shiny #chatbot #openai #gpt3 #nlp #api #gpt4 #chatgpt #rstats #machinelearning #ai #artificialintelligence