openaichatlib


Nameopenaichatlib JSON
Version 1.1.5 PyPI version JSON
download
home_pagehttps://github.com/IAn2018cs/OpenAIChatLib
SummaryOpenAI Chat API
upload_time2024-06-19 07:06:15
maintainerNone
docs_urlNone
authorIAn2018
requires_python<3.13,>=3.9
licenseNone
keywords openai chatgpt api chat
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IAn2018cs/OpenAIChatLib",
    "name": "openaichatlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "openai, ChatGPT, api, chat",
    "author": "IAn2018",
    "author_email": "ian2018cs@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6c/1d/1c183043b1dbf676b420d3b81ce8887172c11ab4b86673eba6908255367a/openaichatlib-1.1.5.tar.gz",
    "platform": null,
    "description": "# OpenAI Chat Python Lib\n\n## Requirements\n```\npython: >=3.9\n```\n\n## Installation\n\n```\npip install openaichatlib\n```\n\n## Usage\n\n```python\nfrom openaichatlib.V3 import Chatbot\n\nbot = Chatbot(\n    api_key=\"YOUR_API_KEY\", \n    api_url=\"YOUR_API_HOST\", # default is https://api.openai.com/v1/chat/completions\n    engine='gpt-3.5-turbo-16k',\n    timeout=120, \n    max_tokens=15_000, \n    proxy=\"YOUR_PROXY_URL\", # like http://127.0.0.1:7890\n    system_prompt=\"You are ChatGPT, a large language model trained by OpenAI\"\n)\n\nreply = bot.ask(\"Hello\")\nprint(reply)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "OpenAI Chat API",
    "version": "1.1.5",
    "project_urls": {
        "Homepage": "https://github.com/IAn2018cs/OpenAIChatLib"
    },
    "split_keywords": [
        "openai",
        " chatgpt",
        " api",
        " chat"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "40649f02f5f515907b17b634660a186597b88147fb44510d1b316fb9d4618b17",
                "md5": "65f009dab0fdddf5e3307cc94b41465f",
                "sha256": "9066e6f0056b263970805b7616ec75804cbd6523bb448bcca4d2556801afafbc"
            },
            "downloads": -1,
            "filename": "openaichatlib-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65f009dab0fdddf5e3307cc94b41465f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 6878,
            "upload_time": "2024-06-19T07:06:12",
            "upload_time_iso_8601": "2024-06-19T07:06:12.085815Z",
            "url": "https://files.pythonhosted.org/packages/40/64/9f02f5f515907b17b634660a186597b88147fb44510d1b316fb9d4618b17/openaichatlib-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c1d1c183043b1dbf676b420d3b81ce8887172c11ab4b86673eba6908255367a",
                "md5": "af3ffa35a8b9de67c45d1c5f5c6c9eb1",
                "sha256": "6a8b8c77b7eea10b9af327ac5aaafa30a2b9e24c888869708e3131670f4399e4"
            },
            "downloads": -1,
            "filename": "openaichatlib-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "af3ffa35a8b9de67c45d1c5f5c6c9eb1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 5856,
            "upload_time": "2024-06-19T07:06:15",
            "upload_time_iso_8601": "2024-06-19T07:06:15.358536Z",
            "url": "https://files.pythonhosted.org/packages/6c/1d/1c183043b1dbf676b420d3b81ce8887172c11ab4b86673eba6908255367a/openaichatlib-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-19 07:06:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IAn2018cs",
    "github_project": "OpenAIChatLib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "openaichatlib"
}
        
Elapsed time: 2.31699s