Metadata-Version: 2.1
Name: openaichatlib
Version: 1.0.3
Summary: OpenAI Chat API
Home-page: https://github.com/IAn2018cs/OpenAIChatLib
Author: IAn2018
Author-email: ian2018cs@gmail.com
Keywords: openai,ChatGPT,api,chat
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9, <3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: prompt-toolkit
Requires-Dist: httpx[socks]
Requires-Dist: requests[socks]
Requires-Dist: OpenAIAuth >=3.0.0
Requires-Dist: rich
Requires-Dist: tiktoken >=0.3.0
Requires-Dist: openai

# OpenAI Chat Python Lib

## Requirements
```
python: >=3.9
```

## Installation

```
pip install openaichatlib
```

## Usage

```python
from openaichatlib.V3 import Chatbot

bot = Chatbot(
    api_key="YOUR_API_KEY", 
    api_url="YOUR_API_HOST", # default is https://api.openai.com/v1/chat/completions
    engine='gpt-3.5-turbo-16k',
    timeout=120, 
    max_tokens=15_000, 
    proxy="YOUR_PROXY_URL", # like http://127.0.0.1:7890
    system_prompt="You are ChatGPT, a large language model trained by OpenAI"
)

reply = bot.ask("Hello")
print(reply)
```
