A Streamlit application that integrates OpenAI's GPT models to interact with TiDB Cloud databases, providing a user interface to query data and generate insights dynamically.
-
Clone the repository:
git clone https://github.com/yourusername/streamlit-tidb-gpt.git cd streamlit-tidb-gpt
-
Create and activate a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up your API keys and database credentials:
- Rename
config.ini.example
toconfig.ini
. - Update the
config.ini
with your OpenAI API key and TiDB credentials.
- Rename
-
Run the application:
streamlit run app.py
-
Navigate to
localhost:8501
in your web browser to view the application.
Configure your API and database settings through the Streamlit sidebar within the application interface. Ensure all details are correct to connect successfully to your TiDB instance.
- Interactive chat interface to query the database using natural language.
- Visualization of query results with options to customize data display.
- Integration with OpenAI's GPT models for generating analytical summaries based on query results.
If you need to remove the repository from your development directory:
rm -rf .git
For more detailed information on configuration and extensions, refer to the provided documentation within the project.