{"id":13593404,"url":"https://github.com/hwchase17/notion-qa","last_synced_at":"2025-05-15T10:07:38.559Z","repository":{"id":65569052,"uuid":"562678926","full_name":"hwchase17/notion-qa","owner":"hwchase17","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-06T05:18:06.000Z","size":50420,"stargazers_count":2152,"open_issues_count":21,"forks_count":373,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-13T00:03:16.345Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwchase17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-11-07T02:39:10.000Z","updated_at":"2025-05-12T07:12:41.000Z","dependencies_parsed_at":"2024-12-19T05:15:01.596Z","dependency_job_id":null,"html_url":"https://github.com/hwchase17/notion-qa","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"71610847545c97041b93ecb3b19d9746623ce80f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwchase17%2Fnotion-qa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwchase17%2Fnotion-qa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwchase17%2Fnotion-qa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwchase17%2Fnotion-qa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwchase17","download_url":"https://codeload.github.com/hwchase17/notion-qa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319720,"owners_count":22051073,"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-08-01T16:01:19.991Z","updated_at":"2025-05-15T10:07:33.546Z","avatar_url":"https://github.com/hwchase17.png","language":"Python","funding_links":[],"categories":["Python","Example applications","开源项目","Open Source Projects"],"sub_categories":["其他聊天机器人","Other / Chatbots"],"readme":"# Notion Question-Answering\n\n🤖Ask questions to your Notion database in natural language🤖\n\n💪 Built with [LangChain](https://github.com/hwchase17/langchain)\n\n# 🌲 Environment Setup\n\nIn order to set your environment up to run the code here, first install all requirements:\n\n```shell\npip install -r requirements.txt\n```\n\nThen set your OpenAI API key (if you don't have one, get one [here](https://beta.openai.com/playground))\n\n```shell\nexport OPENAI_API_KEY=....\n```\n\n# 📄 What is in here?\n- Example data from Blendle \n- Python script to query Notion with a question\n- Code to deploy on StreamLit\n- Instructions for ingesting your own dataset\n\n## 📊 Example Data\nThis repo uses the [Blendle Employee Handbook](https://www.notion.so/Blendle-s-Employee-Handbook-7692ffe24f07450785f093b94bbe1a09) as an example.\nIt was downloaded October 18th so may have changed slightly since then!\n\n## 💬 Ask a question\nIn order to ask a question, run a command like:\n\n```shell\npython qa.py \"is there food in the office?\"\n```\n\nYou can switch out `is there food in the office?` for any question of your liking!\n\nThis exposes a chat interface for interacting with a Notion database.\nIMO, this is a more natural and convenient interface for getting information.\n\n## 🚀 Code to deploy on StreamLit\n\nThe code to run the StreamLit app is in `main.py`. \nNote that when setting up your StreamLit app you should make sure to add `OPENAI_API_KEY` as a secret environment variable.\n\n## 🧑 Instructions for ingesting your own dataset\n\nExport your dataset from Notion. You can do this by clicking on the three dots in the upper right hand corner and then clicking `Export`.\n\n\u003cimg src=\"export_notion.png\" alt=\"export\" width=\"200\"/\u003e\n\nWhen exporting, make sure to select the `Markdown \u0026 CSV` format option.\n\n\u003cimg src=\"export_format.png\" alt=\"export-format\" width=\"200\"/\u003e\n\nThis will produce a `.zip` file in your Downloads folder. Move the `.zip` file into this repository.\n\nRun the following command to unzip the zip file (replace the `Export...` with your own file name as needed).\n\n```shell\nunzip Export-d3adfe0f-3131-4bf3-8987-a52017fc1bae.zip -d Notion_DB\n```\n\nRun the following command to ingest the data.\n\n```shell\npython ingest.py\n```\n\nBoom! Now you're done, and you can ask it questions like:\n\n```shell\npython qa.py \"is there food in the office?\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwchase17%2Fnotion-qa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwchase17%2Fnotion-qa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwchase17%2Fnotion-qa/lists"}