Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techleadhd/chatgpt-retrieval
https://github.com/techleadhd/chatgpt-retrieval
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/techleadhd/chatgpt-retrieval
- Owner: techleadhd
- Created: 2023-06-19T01:46:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-04T16:52:28.000Z (8 months ago)
- Last Synced: 2024-10-01T21:23:13.465Z (about 1 month ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1,685
- Watchers: 30
- Forks: 802
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-chatgpt - techleadhd/chatgpt-retrieval - Simple script to use ChatGPT on your own files. (SDK, Libraries, Frameworks / Python)
- jimsghstars - techleadhd/chatgpt-retrieval - (Python)
README
# chatgpt-retrieval
Simple script to use ChatGPT on your own files.
Here's the [YouTube Video](https://youtu.be/9AXP7tCI9PI).
## Installation
Install [Langchain](https://github.com/hwchase17/langchain) and other required packages.
```
pip install langchain openai chromadb tiktoken unstructured
```
Modify `constants.py.default` to use your own [OpenAI API key](https://platform.openai.com/account/api-keys), and rename it to `constants.py`.Place your own data into `data/data.txt`.
## Example usage
Test reading `data/data.txt` file.
```
> python chatgpt.py "what is my dog's name"
Your dog's name is Sunny.
```Test reading `data/cat.pdf` file.
```
> python chatgpt.py "what is my cat's name"
Your cat's name is Muffy.
```