sanjaymalladi/AI_Document_Chat_Assistant
1
Mistral AI Chat Application
A Streamlit-based chat application powered by Mistral AI's language models.
Features
- Clean and intuitive chat interface
- Real-time responses from Mistral AI
- Message history persistence
- Easy-to-use sidebar controls
- Responsive design
Setup
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt- Create a
.envfile and add your Mistral AI API key:
MISTRAL_API_KEY=your_api_key_hereGet your API key from Mistral AI Platform
Running the Application
Run the application using Streamlit:
streamlit run app.pyThe application will open in your default web browser at http://localhost:8501.
Usage
- Enter your message in the chat input at the bottom of the screen
- Press Enter to send your message
- Wait for the AI's response
- Use the "Clear Chat" button in the sidebar to start a new conversation
Models Available
The application uses the following Mistral AI models:
- mistral-tiny (default)
- mistral-small
- mistral-medium
To change the model, modify the model parameter in the client.chat() function call in app.py.
Requirements
- Python 3.7+
- Streamlit
- Mistral AI Python SDK
- python-dotenv
Note
Make sure to keep your API key secure and never commit it to version control.
