How I Use OpenAI Assistants API To Control My Streamlit App

How I Use OpenAI Assistants API To Control My Streamlit App

10.605 Lượt nghe
How I Use OpenAI Assistants API To Control My Streamlit App
Seen the OpenAI Dev Day Wanderlust Assistants API demo and wondering how to implement a similar web app in full Python? It's all thanks to the new Assistants API feature and its integrated Function Calling. In this video, I prototype a Streamlit version of the app. Through this quick overview, you'll learn to: - leverage Streamlit's Session State for a clean reactive app using an MVC-like pattern - configure an OpenAI Assistant API 's Function calling feature to have OpenAI talk with your app by mapping user intent to predefined functions - layout a chatbot and Plotly map through columns and configured by Streamlit secrets At the end of this video, you will be able to interactively experiment with the new Assistants API through a Streamlit app and have natural language control the flow of your app. 00:00 Intro 00:45 Python App Skeleton 01:55 Configure GPT to generate code? 03:24 Everything in Session State 05:23 Session State is Everything 06:31 GPT-4 Controls Everything 08:28 The Last Stretch 10:21 Easy Peasy --- 🗣️ Stay up to date with the Data Web App Ecosystem - 📑 Follow my socials ➡ https://andfanilo.com - 📧 Get my latest updates in your inbox ➡ https://newsletter.andfanilo.com - 💰 Buy me a coffee to stay awake while editing ➡ https://www.buymeacoffee.com/andfanilo 🔗 Links - Source Code: https://github.com/andfanilo/social-media-tutorials/tree/master/20231116-st_assistants - How Language Model Hallucinations Can Snowball: https://arxiv.org/abs/2305.13534 - Someone did ask about open-sourcing the demo: https://community.openai.com/t/openai-devday-demo-repo-access/478895 🔧 My tools (Affiliate links to support me) - 📕 Streamlit Official Book - https://amzn.to/3QuRPwl - 📷 Main Camera - https://amzn.to/3QvTosB - 📷 Main Lens - https://amzn.to/3svYCwq - 🎙️ Microphone - https://amzn.to/47l5ewA - 🎵 Music & Sound Effects - https://www.epidemicsound.com/referral/a2p22s --- 🪶 I tried my hand at motion graphics & design in this video, and I'm quite happy with the result, plus it was a lot of fun! I hope you liked the small animations too, let me know in the comments I want to keep improving this ⚠️ Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. Thank you for supporting my channel so I can continue providing you with free content! #streamlit #python #datascience #dataapps