{"id":29222764,"url":"https://github.com/davidkiss/langgraph-dynamic-sql-queries","last_synced_at":"2026-04-29T19:05:21.821Z","repository":{"id":302467822,"uuid":"1012122651","full_name":"davidkiss/langgraph-dynamic-sql-queries","owner":"davidkiss","description":"A sample text-to-sql chatbot that can answer questions about Netflix movies by dynamically generating syntactically correct SQL queries using Python, ChatGPT, LangGraph and LangChain's `SQLDatabaseToolkit`.","archived":false,"fork":false,"pushed_at":"2025-07-02T14:03:53.000Z","size":559,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T15:23:13.755Z","etag":null,"topics":["langchain","langgraph","python","sql","text-to-sql"],"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/davidkiss.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,"zenodo":null}},"created_at":"2025-07-01T21:09:19.000Z","updated_at":"2025-07-02T14:03:56.000Z","dependencies_parsed_at":"2025-07-02T15:23:24.320Z","dependency_job_id":"b8c04828-4c40-4e4e-b252-33a3ae7d44e7","html_url":"https://github.com/davidkiss/langgraph-dynamic-sql-queries","commit_stats":null,"previous_names":["davidkiss/langgraph-dynamic-sql-queries"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidkiss/langgraph-dynamic-sql-queries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidkiss%2Flanggraph-dynamic-sql-queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidkiss%2Flanggraph-dynamic-sql-queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidkiss%2Flanggraph-dynamic-sql-queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidkiss%2Flanggraph-dynamic-sql-queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidkiss","download_url":"https://codeload.github.com/davidkiss/langgraph-dynamic-sql-queries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidkiss%2Flanggraph-dynamic-sql-queries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["langchain","langgraph","python","sql","text-to-sql"],"created_at":"2025-07-03T04:02:10.061Z","updated_at":"2026-04-29T19:05:21.805Z","avatar_url":"https://github.com/davidkiss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nSample text-to-sql chatbot that can answer questions about Netflix movies by dynamically generating syntactically correct SQL queries using Python, ChatGPT, LangGraph and LangChain's `SQLDatabaseToolkit` based on LangChain's sample [SQL Agent](https://langchain-ai.github.io/langgraph/tutorials/sql-agent/).\n\n![Screenshot #1](docs/screenshot1.png)\n![Screenshot #2](docs/screenshot2.png)\n\n## Technology Stack\n\n- **[LangChain](https://langchain.com/)**: An opens-source framework that helps developers build applications powered by large language models (LLMs)\n- **[LangGraph](https://langgraph.dev/)**: An opens-source framework by LangChain for building and managing complex AI agents using graph-based architecture\n- **[ChatGPT](https://openai.com/chatgpt)**: A popular LLM provided by OpenAI\n- **[Gradio](https://gradio.app/)**: A popular opens-source library for building web interfaces for machine learning models. This project uses Gradio to create a web interface for the chatbot.\n- **[LangSmith](https://smith.langchain.com/)**: An opens-source framework by LangChain for tracing and monitoring LLM applications.\n- **[uv](https://github.com/conda-forge/uv)**: A fast opens-source Python package manager - a drop-in replacement for `pip`, `conda` and `virtualenv`.\n\n## Setup\n\n### 1. Install uv\n\nFollow the instructions here to install uv, if you haven't already.\n\n### 2. Install Dependencies\n\n```bash\nuv sync\n```\n\n### 3. Set Up OpenAI API Key\n\nCreate a .env file in the project root:\n\n```bash\n# .env\nOPENAI_API_KEY=your-openai-api-key-here\n```\n\nFor tracing using LangSmith [create a free account and API key](https://docs.smith.langchain.com/administration/how_to_guides/organization_management/create_account_api_key) and include these environment variables in the `.env` file:\n\n```bash\nLANGSMITH_TRACING=true\nLANGSMITH_API_KEY=your-langsmith-api-key\n```\n\n### 4. Download DB script\n\n```bash\ncurl -L -o netflixdb.sqlite https://github.com/lerocha/netflixdb/releases/download/v1.0.9/netflixdb.sqlite\n```\n\n### 5. Run the chatbot\n\n```bash\nuv run main.py\n```\n\nTry the chatbot here: [http://127.0.0.1:7860/](http://127.0.0.1:7860/).\n\nExample questions:\n\n- \"what are the most viewed movies?\"\n- \"what are the TV Show Seasons released since 2024-01-01?\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidkiss%2Flanggraph-dynamic-sql-queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidkiss%2Flanggraph-dynamic-sql-queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidkiss%2Flanggraph-dynamic-sql-queries/lists"}