zhizengzeng


Namezhizengzeng JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/0x24a/zhizengzeng
SummaryA 3rd party SDK for ZhiZengZeng AI
upload_time2024-03-12 13:36:23
maintainer
docs_urlNone
author0x24a
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">ZhiZengZeng-Python-SDK</h1>
<p align="center">
<em>✨A simple OpenAI-like SDK for ZhiZengZeng AI.✨</em>
</p>


# Quickstart
Install using pip:
This will install ZhiZengZeng Python SDK with minimal (pure Python) dependencies.
```
$ pip3 install zhizengzeng
```
Create an application, in example.py:
```
from zhizengzeng import ZhiZengZeng
client = ZhiZengZeng(api_key="YOUR_API_KEY")
print("GPT says 1+1="+client.completions.create(model="gpt-3.5-turbo-instruct", prompt="1+1=2\n2+2=4\n4+4=8\n1+1=",max_tokens=1).choices[0].text)
```
Remember to replace `YOUR_API_KEY` to your real ZhiZengZeng(Not OpenAI!) token.  
If nothing was wrong, You should see `GPT says 1+1=2` in your console.

# Usage
Most API calls are made in the same way as OpenAI (see [here](https://github.com/openai/openai-python/blob/e41abf7b7dbc1e744d167f748e55d4dedfc0dca7/api.md)), and are listed here only in relation to the OpenAI, only the different/additional APIs are listed here.

## Get Balance
The Balance API allows you to get the balance of your account (in CNY), which can be called in two ways.
### Using property
```python
from zhizengzeng import ZhiZengZeng
client = ZhiZengZeng(api_key="YOUR_API_KEY")
print("Account balance: " + str(client.balance)) #Balance is float type!
```
### Using get_balance()
```python
from zhizengzeng import ZhiZengZeng
client = ZhiZengZeng(api_key="YOUR_API_KEY")
print("Account balance: " + str(client.get_balance())) #Balance is float type!
```

# Requirements
Python 3.7 or higher.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/0x24a/zhizengzeng",
    "name": "zhizengzeng",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "0x24a",
    "author_email": "tanhanze@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/29/065acab080b0d7e8b0ed00c5cdd1fa2509e5828dbc8892bd8cc5c15e5405/zhizengzeng-0.1.1.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">ZhiZengZeng-Python-SDK</h1>\n<p align=\"center\">\n<em>\u2728A simple OpenAI-like SDK for ZhiZengZeng AI.\u2728</em>\n</p>\n\n\n# Quickstart\nInstall using pip:\nThis will install ZhiZengZeng Python SDK with minimal (pure Python) dependencies.\n```\n$ pip3 install zhizengzeng\n```\nCreate an application, in example.py:\n```\nfrom zhizengzeng import ZhiZengZeng\nclient = ZhiZengZeng(api_key=\"YOUR_API_KEY\")\nprint(\"GPT says 1+1=\"+client.completions.create(model=\"gpt-3.5-turbo-instruct\", prompt=\"1+1=2\\n2+2=4\\n4+4=8\\n1+1=\",max_tokens=1).choices[0].text)\n```\nRemember to replace `YOUR_API_KEY` to your real ZhiZengZeng(Not OpenAI!) token.  \nIf nothing was wrong, You should see `GPT says 1+1=2` in your console.\n\n# Usage\nMost API calls are made in the same way as OpenAI (see [here](https://github.com/openai/openai-python/blob/e41abf7b7dbc1e744d167f748e55d4dedfc0dca7/api.md)), and are listed here only in relation to the OpenAI, only the different/additional APIs are listed here.\n\n## Get Balance\nThe Balance API allows you to get the balance of your account (in CNY), which can be called in two ways.\n### Using property\n```python\nfrom zhizengzeng import ZhiZengZeng\nclient = ZhiZengZeng(api_key=\"YOUR_API_KEY\")\nprint(\"Account balance: \" + str(client.balance)) #Balance is float type!\n```\n### Using get_balance()\n```python\nfrom zhizengzeng import ZhiZengZeng\nclient = ZhiZengZeng(api_key=\"YOUR_API_KEY\")\nprint(\"Account balance: \" + str(client.get_balance())) #Balance is float type!\n```\n\n# Requirements\nPython 3.7 or higher.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A 3rd party SDK for ZhiZengZeng AI",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/0x24a/zhizengzeng"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3879be8141b6d2aae492909d2840bb11f7e931b6ad95eb1834f34171d0bfc589",
                "md5": "12258f835a404478c8cc264650bd1188",
                "sha256": "4ab06d0760235e5a1ecf7a69c51f892c57f8a36ef4d19dcd0c6a89757c809f62"
            },
            "downloads": -1,
            "filename": "zhizengzeng-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12258f835a404478c8cc264650bd1188",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3692,
            "upload_time": "2024-03-12T13:36:22",
            "upload_time_iso_8601": "2024-03-12T13:36:22.132241Z",
            "url": "https://files.pythonhosted.org/packages/38/79/be8141b6d2aae492909d2840bb11f7e931b6ad95eb1834f34171d0bfc589/zhizengzeng-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e29065acab080b0d7e8b0ed00c5cdd1fa2509e5828dbc8892bd8cc5c15e5405",
                "md5": "7f58e2a12a10f5002142595625ac1dfd",
                "sha256": "2797ea9d46a8b7003552a1c962c83af2388aaf64f5931c276a1eacc7bd7154bf"
            },
            "downloads": -1,
            "filename": "zhizengzeng-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7f58e2a12a10f5002142595625ac1dfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3289,
            "upload_time": "2024-03-12T13:36:23",
            "upload_time_iso_8601": "2024-03-12T13:36:23.218599Z",
            "url": "https://files.pythonhosted.org/packages/2e/29/065acab080b0d7e8b0ed00c5cdd1fa2509e5828dbc8892bd8cc5c15e5405/zhizengzeng-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-12 13:36:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "0x24a",
    "github_project": "zhizengzeng",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "zhizengzeng"
}
        
Elapsed time: 0.25476s