Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tobiasbueschel/search-gpt
🌳 Connecting ChatGPT with the Internet
https://github.com/tobiasbueschel/search-gpt
chat-gpt chatbot chatgpt google-search
Last synced: 16 days ago
JSON representation
🌳 Connecting ChatGPT with the Internet
- Host: GitHub
- URL: https://github.com/tobiasbueschel/search-gpt
- Owner: tobiasbueschel
- License: mit
- Created: 2023-03-04T16:08:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-11T01:58:46.000Z (almost 2 years ago)
- Last Synced: 2025-01-03T05:22:53.801Z (23 days ago)
- Topics: chat-gpt, chatbot, chatgpt, google-search
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/search-gpt
- Size: 1.23 MB
- Stars: 167
- Watchers: 7
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
- Awesome-ChatGPT - SearchGPT: Connecting ChatGPT with the Internet
- awesome-chatgpt - SearchGPT - Connect ChatGPT with the Internet. (CLI tools / Examples)
- project-awesome - tobiasbueschel/search-gpt - 🌳 Connecting ChatGPT with the Internet (JavaScript)
- fucking-awesome-chatgpt - SearchGPT: Connecting ChatGPT with the Internet
- awesome-chatgpt - SearchGPT: Connecting ChatGPT with the Internet
- ai-game-devtools - SearchGPT
- awesome-chatgpt - SearchGPT - Connect ChatGPT with the Internet. (CLI tools / Examples)
README
You want to try ChatGPT with Internet connectivity so that you can ask about events beyond 2021, but don't have access to AI-enabled Bing and don't want to wait for Google's Bard? SearchGPT gives you this functionality today - it crawls the Internet for information and then feeds it back to ChatGPT.
![SearchGPT Demo](./demo.gif)
## Usage
The easiest way to get started with search-gpt is to run the following:
```sh
export OPENAI_API_KEY=
export GOOGLE_SEARCH_API_KEY=
export GOOGLE_SEARCH_ID=npx search-gpt
```Alternatively, you can also run:
```sh
npm install --global search-gpt# Run SearchGPT with this command
searchgpt
```Ensure you have your own [Google Search API key](https://developers.google.com/custom-search/v1/introduction), [Programmable Search Engine](https://programmablesearchengine.google.com/controlpanel/all) and [OpenAI API key](https://platform.openai.com/) before running the CLI.
Once the CLI starts, it will prompt you to enter a question. Simply type in your query, and the AI assistant will search the web and generate a response.
## How it works
This is a proof of concept and is far from a proper implementation (e.g., Microsoft's [Prometheus Model](https://techcrunch.com/2023/02/07/openais-next-generation-ai-model-is-behind-microsofts-new-search)) - I wanted to experiment how easy it could be to crawl certain search engines and then feed these results into a large language model (LLM) such as GPT 3.5. Apart from querying Google Search, one could also think about integrating other APIs to crawl data and then feed it into the LLM.
```mermaid
flowchart LR
A[User enters question] --> B[Search Google]
A --> C[Search Twitter, not implemented yet]
A --> D[Search other engines]
B --> E[Search results handed to ChatGPT]
E --> F[ChatGPT uses this context to provide an answer]
```Please note: the current implementation feeds Google Search results to `gpt-3.5-turbo` and does not include previous messages in subsequent queries to avoid surpassing the token limit.
## License
This project is licensed under the [MIT license](./license).