{"id":22540426,"url":"https://github.com/sureshbeekhani/chat-with-postgres-sql","last_synced_at":"2026-04-19T13:32:18.689Z","repository":{"id":266853608,"uuid":"861593113","full_name":"SURESHBEEKHANI/Chat-with-Postgres-SQL","owner":"SURESHBEEKHANI","description":" This Streamlit app enables users to query a MySQL database using natural language. It translates questions into SQL, executes them, and returns the results in plain language. Powered by LangChain and Groq, the app makes database querying simple for non-technical users.","archived":false,"fork":false,"pushed_at":"2024-12-06T14:13:53.000Z","size":207,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T07:21:53.049Z","etag":null,"topics":["ai","chatbot","langchain","sql","sqlite","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SURESHBEEKHANI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-23T07:28:43.000Z","updated_at":"2024-12-11T07:50:11.000Z","dependencies_parsed_at":"2024-12-06T15:37:22.405Z","dependency_job_id":null,"html_url":"https://github.com/SURESHBEEKHANI/Chat-with-Postgres-SQL","commit_stats":null,"previous_names":["sureshbeekhani/chat-with-mysql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SURESHBEEKHANI/Chat-with-Postgres-SQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SURESHBEEKHANI%2FChat-with-Postgres-SQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SURESHBEEKHANI%2FChat-with-Postgres-SQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SURESHBEEKHANI%2FChat-with-Postgres-SQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SURESHBEEKHANI%2FChat-with-Postgres-SQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SURESHBEEKHANI","download_url":"https://codeload.github.com/SURESHBEEKHANI/Chat-with-Postgres-SQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SURESHBEEKHANI%2FChat-with-Postgres-SQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32009119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatbot","langchain","sql","sqlite","streamlit"],"created_at":"2024-12-07T12:10:53.868Z","updated_at":"2026-04-19T13:32:18.667Z","avatar_url":"https://github.com/SURESHBEEKHANI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Chat with MySQL\nemoji: 💬\ncolorFrom: purple\ncolorTo: blue\nsdk: streamlit\nsdk_version: \"1.38.0\"\napp_file: src/app.py\npinned: false\n---\n\n# Chat with MySQL\n\nThis is a Streamlit application that allows users to interact with a MySQL database via natural language queries. The app uses LangChain, Groq, and Streamlit to generate SQL queries and respond with database results in natural language.\n\n## Features\n- Connect to your MySQL database and chat with it using natural language.\n- Automatically generate SQL queries based on your questions.\n- Receive responses both in SQL and human-readable formats.\n\n## Libraries and Tools Used\n- **dotenv**: Loads environment variables from a `.env` file.\n- **LangChain**: Handles the prompt templates and chains for generating SQL queries and responses.\n- **Groq**: Utilized as the model for chat-based interactions and SQL generation.\n- **Streamlit**: Provides the interface for interacting with the database and handling the conversation.\n- **SQLDatabase**: LangChain's utility to manage SQL database connections and queries.\n  \n## Setup Instructions\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-repo/chat-with-mysql.git\n   cd chat-with-mysql\nInstall the required Python libraries:\n\nbash\nCopy code\npip install -r requirements.txt\nCreate a .env file in the root directory of the project and add your database credentials:\n\nbash\nCopy code\nDB_USER=root\nDB_PASSWORD=admin\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=Chinook\nRun the application:\n\nbash\nCopy code\nstreamlit run app.py\nOpen your browser and go to the Streamlit web app, typically at http://localhost:8501.\n\nHow It Works\nThe app connects to a MySQL database using credentials from environment variables.\nIt uses a LangChain model to process user queries, convert them into SQL statements, and return the results.\nYou can view the SQL query generated from your questions and the corresponding response.\nConfiguration\nCheck out the configuration reference at Hugging Face Spaces Config Reference.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsureshbeekhani%2Fchat-with-postgres-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsureshbeekhani%2Fchat-with-postgres-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsureshbeekhani%2Fchat-with-postgres-sql/lists"}