A Streamlit application that allows users to create and chat with custom personas using OpenAI's Assistant API.
- Create detailed personas with customizable traits, backgrounds, and expertise
- Upload reference documents to enhance persona knowledge
- Chat with created personas in real-time
- Download chat history and summaries
- Manage multiple personas
- Secure API key handling through Streamlit secrets
- Clone the repository:
git clone <repository-url>
cd persona-creator-chat
- Install dependencies:
pip install -r requirements.txt
-
Configure Secrets in Streamlit Cloud:
- Go to your Streamlit Cloud dashboard
- Navigate to "Settings" > "Secrets"
- Add your secrets in the following format:
OPENAI_API_KEY = "your-api-key-here" OPENAI_ORGANIZATION = "your-org-id-here" # Optional
-
Deploy on Streamlit Cloud:
- Add the secrets in the Streamlit Cloud dashboard under "Settings" > "Secrets"
- Connect your GitHub repository to Streamlit Cloud
- Deploy the application
.
├── requirements.txt # Python dependencies
├── src/
├── src/
│ ├── main.py # Application entry point
│ ├── config.py # Configuration settings
│ ├── utils/ # Utility functions
│ ├── services/ # Business logic and API interactions
│ ├── components/ # UI components
│ └── pages/ # Application pages
└── README.md # Project documentation
- Start the application:
streamlit run src/main.py
-
Creating a Persona:
- Click "Create New Persona" in the sidebar
- Fill in the persona details
- Upload any reference documents
- Click "Create Persona"
-
Chatting with a Persona:
- Select a persona from the sidebar
- Type your message in the chat input
- Download chat history or get summaries using the buttons below
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request