Code Monkey home page Code Monkey logo

pingcap-test's Introduction

Streamlit ChatGPT Integration with TiDB

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.

Quick Start

  1. Clone the repository:

    git clone https://github.com/yourusername/streamlit-tidb-gpt.git
    cd streamlit-tidb-gpt
  2. Create and activate a virtual environment:

    python -m venv env
    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up your API keys and database credentials:

    • Rename config.ini.example to config.ini.
    • Update the config.ini with your OpenAI API key and TiDB credentials.
  5. Run the application:

    streamlit run app.py
  6. Navigate to localhost:8501 in your web browser to view the application.

Configuration

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.

Features

  • 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.

Removing the Repository

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.

pingcap-test's People

Contributors

northpr avatar dat04-hub avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.