{"id":22661498,"url":"https://github.com/splitgraph/splitgraph-llm-demo","last_synced_at":"2025-04-12T06:11:31.225Z","repository":{"id":265430238,"uuid":"648596700","full_name":"splitgraph/splitgraph-llm-demo","owner":"splitgraph","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-13T13:56:29.000Z","size":9,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T20:17:16.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/splitgraph.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":"2023-06-02T10:44:19.000Z","updated_at":"2023-08-22T04:50:33.000Z","dependencies_parsed_at":"2024-11-29T11:07:40.929Z","dependency_job_id":"f3659062-9f6a-465b-9d9b-016036582f11","html_url":"https://github.com/splitgraph/splitgraph-llm-demo","commit_stats":null,"previous_names":["splitgraph/splitgraph-llm-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsplitgraph-llm-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsplitgraph-llm-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsplitgraph-llm-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitgraph%2Fsplitgraph-llm-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitgraph","download_url":"https://codeload.github.com/splitgraph/splitgraph-llm-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-09T11:16:35.807Z","updated_at":"2025-04-12T06:11:31.205Z","avatar_url":"https://github.com/splitgraph.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installing dependencies\n\n## PostgreSQL database with the pgvector extension installed\nThis demo needs a PostgreSQL database with [`pgvector`](https://github.com/pgvector/pgvector) installed.\nMany package managers like Homebrew and `apt` have pre-packaged version of `pgvector`.\n\nDon't forget to activate the extension for the database used in the demo:\n```sql\nCREATE EXTENSION vector;\n```\n\n## Installing python dependencies\n\n```bash\n# create venv\npython3 -m venv venv\n# activate venv\n. venv/bin/activate\n# install deps\npip install langchain openai pgvector tiktoken unstructured psycopg2 tabulate\n```\n\n# Env vars\n\nThe code in the demo uses the following env vars:\n\n- `OPENAI_API_KEY`, eg: `sk-F9Ci...2J`\n- `PG_CONN_STR_LOCAL`, eg: `postgresql://myuser:***@localhost:5432/mydb`\n- `PG_CONN_STR_DDN`, eg: `postgresql://4ce270ae3cdd4440aed5d105869949c5:***@data.splitgraph.com:5432/ddn`\n\n# Usage\n\n```bash\n# first, index the repositories in namespace 'cityofchicago'\npython3 index_repos.py cityofchicago\n# query the repositories in the cityofchicago namespace\npython query.py cityofchicago 'How many restaurants are there in Chicago?'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitgraph%2Fsplitgraph-llm-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitgraph%2Fsplitgraph-llm-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitgraph%2Fsplitgraph-llm-demo/lists"}