Metadata-Version: 2.1
Name: revchatgptauth
Version: 2023.4.16
Summary: 
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: browser-cookie3 (>=0.17.1,<0.18.0)
Requires-Dist: httpx (>=0.24.0,<0.25.0)
Requires-Dist: poetry (>=1.4.2,<2.0.0)
Description-Content-Type: text/markdown

# revChatGPTAuth

Authenticate using your browser's cookies - no need to inconveniently copy and paste from your browser!

## Getting Started

### Prerequisites

- <= Python 3.9

### Installing

```bash
pip install revChatGPTAuth
```

### Usage

```python
from revChatGPTAuth import get_access_token
access_token = get_access_token('brave') # your browser
```

### With `revChatGPT`

The following example codes are from the `revChatGPT` README.

#### Basic example (streamed)

```python

from revChatGPT.V1 import Chatbot
from revChatGPTAuth import get_access_token

chatbot = Chatbot(config={
  "access_token": get_access_token('brave')
})

print("Chatbot: ")
prev_text = ""
for data in chatbot.ask(
    "Hello world",
):
    message = data["message"][len(prev_text) :]
    print(message, end="", flush=True)
    prev_text = data["message"]
print()
```

#### Basic example (single result)

```python
from revChatGPT.V1 import Chatbot
from revChatGPTAuth import get_access_token

chatbot = Chatbot(config={
  "access_token": get_access_token('brave')
})

prompt = "how many beaches does portugal have?"
response = ""

for data in chatbot.ask(
  prompt
):
    response = data["message"]

print(response)
```

