Metadata-Version: 2.1
Name: goldretriever
Version: 0.1.3
Summary: Create and host retrieval plugins for ChatGPT in one click
Author: Jina AI
Author-email: hello@jina.ai
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: PyPDF2 (>=3.0.1,<4.0.0)
Requires-Dist: arrow (>=1.2.3,<2.0.0)
Requires-Dist: docarray (>=0.21.0,<0.22.0)
Requires-Dist: docx2txt (>=0.8,<0.9)
Requires-Dist: fastapi (>=0.92.0,<0.93.0)
Requires-Dist: jcloud (>=0.2.10,<0.3.0)
Requires-Dist: jina (>=3.16.0,<4.0.0)
Requires-Dist: numpy (>=1.24.2,<2.0.0)
Requires-Dist: openai (>=0.27.2,<0.28.0)
Requires-Dist: pydantic (>=1.10.5,<2.0.0)
Requires-Dist: pyjwt (==2.6.0)
Requires-Dist: python-dotenv (>=0.21.1,<0.22.0)
Requires-Dist: python-multipart (>=0.0.6,<0.0.7)
Requires-Dist: python-pptx (>=0.6.21,<0.7.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Requires-Dist: tenacity (>=8.2.1,<9.0.0)
Requires-Dist: tiktoken (>=0.3.1,<0.4.0)
Requires-Dist: typer (>=0.7.0,<0.8.0)
Requires-Dist: urllib3 (>=1.26.7,<2.0.0)
Requires-Dist: uvicorn (>=0.20.0,<0.21.0)
Requires-Dist: wheel (>=0.37.0,<0.38.0)
Description-Content-Type: text/markdown

# 🐕 Gold Retriever
>Powered by [Jina](https://github.com/jina-ai/jina) and [DocArray](https://github.com/docarray/docarray)

Easily empower ChatGPT to store and analyze your data using `goldretriever`, a powerful command-line tool for creating and hosting retrieval plugins in just a few simple steps.

![Blog images](https://github.com/jina-ai/GoldRetriever/assets/45267439/e722a8a8-3308-45a4-a7f6-34c71f5a2215)

### 🎬 Showcase: Real-world Plugin Creations

- Personal Study Assistant - [Blog](https://jina.ai/news/gold-retriever-let-chatgpt-talk-to-your-data/) | [Video](https://www.youtube.com/watch?v=gQz-vuo8w5I)

## ⚡ Quick Start

### 📦 Installation

1. Ensure you have Python 3.8 or later.
2. Install the tool via pip:
  ```bash
  pip install goldretriever
  ```

### 🚀 Deployment
1. Run the following command to deploy the plugin:
```bash
goldretriever deploy --key <your openai key>
```
2. Store the "Gateway (Http)" URL and the Bearer token provided in the output.
```bash
╭──────────────────────── 🎉 Flow is available! ────────────────────────╮
│                                                                       │
│   ID               retrieval-plugin-<plugin id>                       │
│   Gateway (Http)   https://retrieval-plugin-<plugin id>.wolf.jina.ai  │
│   Dashboard        https://dashboard.wolf.jina.ai/flow/<plugin id>    │
│                                                                       │
╰───────────────────────────────────────────────────────────────────────╯
Bearer token: <your bearer token>
```

### 📚 Data Indexing
1. Gather relevant text data files (PDF, TXT, DOCX, PPTX, or MD) in a directory.
2. Index the data:
```bash
goldretriever index --data my_files
```
  Or, use `docarray (v0.21.0)` for text data:
```python
from docarray import Document, DocumentArray

texts = ['Text 1', 'Text 2', 'Text 3']
docs = DocumentArray([Document(text=text) for text in texts])
docs.save_binary('docs.bin')
```
And then:
```bash
goldretriever index --data docs.bin
```

### 🔗 Integration
1. Go to OpenAI Plugins.
2. Select "Develop your own plugin".
3. Enter the "Gateway (Http)" URL and Bearer token from the deployment step.


## 🎛️ Advanced Usage


### 🛠️ Configuration
To tailor the plugin to your needs, change the name and description during deployment:
```bash
goldretriever deploy --key <your openai key> --name "Custom Name" --description "Custom description"
```
If not specified, default values will be used.

| Argument    | Description                                   | Default Value                                                                                                                                                                                                                               |
|:------------|:----------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name        | Human-readable name, such as the full company name	  | Gold Retriever                                                                                                                                                                                                                              |
| description | Description better tailored to the model, such as token context length considerations or keyword usage for improved plugin prompting                                      | Plugin for searching through the user's documents (such as files, emails, and more) to find answers to questions and retrieve relevant information. Use it whenever a user asks something that might be found in their personal information |



### 📋 Listing Plugins
List your plugins and their status:
```bash
goldretriever list
```

Output:
```bash
Plugin ID: ece735568f | Status: Serving
```

### 🗑️ Deleting Plugins
Delete a plugin:
```bash
goldretriever delete <plugin id>
```

### 🔍 Indexing Specific Plugins
Index data for a specific plugin:
```bash
goldretriever index --data my_files --id <plugin_id>
```
If the plugin ID is not specified, the last created plugin will be indexed.

## 🎓 Acknowledgements
This project is built upon the open-source [chatgpt-retrieval-plugin](https://github.com/openai/chatgpt-retrieval-plugin) repository developed by OpenAI.

