https://github.com/sbslee/streamlit-openai
Build AI chatbots with Streamlit and OpenAI's API
https://github.com/sbslee/streamlit-openai
assistants-api chat-completions-api function-calling openai streamlit
Last synced: 4 months ago
JSON representation
Build AI chatbots with Streamlit and OpenAI's API
- Host: GitHub
- URL: https://github.com/sbslee/streamlit-openai
- Owner: sbslee
- License: mit
- Created: 2025-02-04T03:33:12.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T12:33:50.000Z (4 months ago)
- Last Synced: 2025-02-13T01:35:29.898Z (4 months ago)
- Topics: assistants-api, chat-completions-api, function-calling, openai, streamlit
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# streamlit-openai
## Installation
```
$ pip install streamlit-openai
```## Usage
Save the following code to `app.py`:
```
import streamlit as st
import streamlit_openai as soif "chat" not in st.session_state:
# Use Chat Completions API
st.session_state.chat = so.utils.BasicChat()# Alternatively, use Assistants API
# st.session_state.chat = so.utils.AssistantChat()st.session_state.chat.start()
```Run the app:
```
$ streamlit run app.py
```