You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a secrets.toml file in the .streamlit folder.
OPENAI_API_KEY="xxx"MISTRAL_API_KEY="xxx"# Optional, if you set provider to "mistral" in `main.py`PHOSPHO_PROJECT_ID="xxx"PHOSPHO_API_KEY="xxx"
Install requirements. You need Python >=3.9
# Optional: create a virtual env
python -m venv .env
# To activate the virtual env on MacOS and Linux:source .env/bin/activate
# To activate the virtual env on Windows:source .env/Scripts/activate
# Install requirements
pip install -r requirements.txt
Run!
streamlit run streamlit_app.py
Deploy on Streamlit Community Cloud
The easiest way to deploy the chatbot on internet is with Streamlit Community Cloud.
Fork this repository while connected to your github account. The Fork button is on the top right.
Login or register to Streamlit share with the same github account
On Streamlit share, click on "New App".
In the form, select your fork of the phospho repo. If you don't see the repo in the list, you can paste the URL.
In the main file path, enter streamlit_app.py
Click on Advanced Settings, and add the content of the secrets.toml file:
Hit Save, and click deploy. Streamlit will now deploy your app on internet. Once it's done, click on the Share button on the top-right to share your Santa Claus chatbot.
Have a chat with your agent!
Analyze the logs
After talking to your agent, go to the phospho dashboard to see the logs.
Run a clustering or create custom analytics to detect specific patterns in conversations.
Get in touch
An issue? Special request? Feel free to reach out to contact@phospho.ai for technical questions, job opportunities, and anything else.
About
Template for a simple chatbot using OpenAI-like API and a Streamlit UI