{"id":13637139,"url":"https://github.com/hunkim/es-gpt","last_synced_at":"2025-04-22T21:02:21.467Z","repository":{"id":65971789,"uuid":"603674106","full_name":"hunkim/es-gpt","owner":"hunkim","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-15T04:01:59.000Z","size":41,"stargazers_count":211,"open_issues_count":0,"forks_count":31,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T18:41:57.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/hunkim.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}},"created_at":"2023-02-19T08:26:05.000Z","updated_at":"2025-03-03T13:57:34.000Z","dependencies_parsed_at":"2024-01-06T21:52:09.219Z","dependency_job_id":"9d7aa01d-82c8-4815-964a-a7587b48dfce","html_url":"https://github.com/hunkim/es-gpt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fes-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fes-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fes-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fes-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunkim","download_url":"https://codeload.github.com/hunkim/es-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250324681,"owners_count":21411943,"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-02T00:01:11.179Z","updated_at":"2025-04-22T21:02:21.356Z","avatar_url":"https://github.com/hunkim.png","language":"HTML","funding_links":[],"categories":["Development","开发"],"sub_categories":["Projects","项目"],"readme":"# Elasticsearch + GPT3 Answerer\nWant to turn your (elastic) search into something as hot as Bing + ChatGPT? Look no further than the Elasticsearch + GPT3 Answerer! Our program intercepts Elasticsearch results and sends them to GPT3 to provide accurate and relevant answers to your queries. Plus, it's just plain fun to use!\n\n## Features\n* Intercept Elasticsearch results and send them to GPT3 for more accurate answers\n* Two installation options: all-in-one and on-the-fly\n* Live demo available to see the program in action\n\n\u003cimg width=\"1650\" alt=\"image\" src=\"https://user-images.githubusercontent.com/901975/219938519-12c6d7af-2756-4e43-bf32-796ce7084a50.png\"\u003e\n\nIt is designed to help users get more accurate and relevant answers to their queries, by leveraging the power of Elasticsearch and GPT3.\n\n## Live Demo\n![ezgif-2-48b3807122](https://user-images.githubusercontent.com/901975/219939314-a8f8f63e-75f6-4805-a743-2b03ab410e0c.gif)\n\nCheck out our live demo at https://es-gpt.sung.devstage.ai/ to see the Elasticsearch + GPT3 Answerer in action! Please note that the site may be unstable and we are currently using the text-ada-001 model for proof of concept, so the GPT answer may be poor. However, this demo shows the concept of how the Elasticsearch + GPT3 Answerer works.\n\n## How it works\nSee this diagram. \n\n\u003cimg width=\"1489\" alt=\"image\" src=\"https://user-images.githubusercontent.com/901975/219938678-7f0b5dc3-226f-41e0-a59f-247547d54b9c.png\"\u003e\n\n## Installation\nTo use the Elasticsearch + GPT3 Answerer, you'll need to have access to both Elasticsearch and GPT3, as well as Python installed on your system. We offer two installation options:\n\n### All-in-one installation\nTo use the all-in-one installation, follow these steps:\n\nClone this repository to your local machine.\n```bash\n$ git clone https://github.com/hunkim/es-gpt.git\n$ cd es-gpt\n```\n\nModify the .env for your Elasticsearch and GPT3 credentials and crawl_index.py file to index your documents.\n```bash\n$make crawl\n```\n\nThen, this will run the backend server:\n```bash\n$ make run\n```\n\nThen, visit the backend server. The web page will then intercept the Elasticsearch results and send them to GPT3 to provide a reasonable answer. This method is very fast, as the program embeds documents during indexing.\n\n### On-the-fly installation\nTo use the on-the-fly installation, follow these steps:\n\nAdd the following scripts to your search page. See `static/p.html`. Specify the query, results, and gpt_answer output div IDs in your original search page:\n```html\n\u003cscript src=\"sse.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"es-gpt.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nwindow.addEventListener(\"load\", function () {\n    summarizeOnChange(\"query\", \"results\", \"gpt_answer\");\n});\n\u003c/script\u003e\n```\nModify the .env with your Elasticsearch and GPT3 credentials.\nInstall the required dependencies by running the following command in your terminal:\n```\n$ make run\n```\n\nRun your search web enter a query. The program will intercept the HTML results and send them to GPT3 to provide a reasonable answer. This method is convenient, but slower, as the program embeds the search results and query on-the-fly.\n\n## Contributing\nWe welcome contributions from the community! If you have ideas for how to improve the Elasticsearch + GPT3 Answerer, please open an issue or submit a pull request. We love hearing from fellow search enthusiasts!\n\n## License\nThis program is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fes-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunkim%2Fes-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fes-gpt/lists"}