gpt-address-api


Namegpt-address-api JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/Naruno/GPT-Address-API
SummaryDecentralized GPT API for everyone !
upload_time2023-04-18 20:45:20
maintainer
docs_urlNone
authorNaruno Developers
requires_python>= 3
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GPT Address API (GPTAAPI) for Naruno
GPTAAPI is a decentralized API for OpenAI GPT. It allows you to use GPT without exposing your API key to the public. It is based on the [Naruno](https://naruno.org/) blockchain and uses the [Naruno API](https://naruno.org/api/) to communicate with the blockchain. GPTAAPI is written in Python and uses the [OpenAI GPT-3 API](https://openai.com/blog/openai-api/) to communicate with GPT.

## Features
- Decentralized system
- Secure communication between nodes
- Fast and easy to use
- Secure point for GPT API's
- Uses encryption to protect sensitive information


## Installation
You can install GPTAAPI by pip3:

```console
pip3 install gpt_address_api
```

## Usage

*If you want to use gpt_address_api you must to use Naruno. For now please checkout the [Baklava Testnet](https://naruno.org/baklava-testnet/).

Getting address of client and server:
```console
narunocli -pw
```

### Server
For accessing your gpt api on blockchain you should create a gpt_address_api, giving trusted user addresses and api_key.

```python
from gpt_address_api import gptaapi

my_gptaapi_server = gptaapi("MyNarunoPass")

my_gptaapi_server.set_encrypt_key("mystrongencrypt_key")

my_gptaapi_server.set_api_key("my_open_ai_api_key")

my_gptaapi_server.add_user("client_address")

my_gptaapi_server.run()
```

also you can use in command line:
```console	
gptaapi --password MyNarunoPass --encrypt_key "mystrongencrypt_key" --trusted_users ["client_address"] --api_key my_open_ai_api_key run
```

### Client
To use gptaapi, you can call the gptaapi.ask function with your blockchain address, message and encryption key as the parameter:

```python
from gpt_address_api import gptaapi

my_gptaapi_client = gptaapi("MyNarunoPass")

response = my_gptaapi_client.ask("server_address", "Hello gpt, how are you", "mystrongencrypt_key")

print(response)

my_gptaapi_client.close()
```

also you can use in command line:
```console	
gptaapi --password "MyNarunoPass" ask "server_address" "Hello gpt, how are you" "mystrongencrypt_key"
```


This will return the response of gpt result.

## Contributing
Contributions to gptaapi are welcome! If you have any suggestions or find a bug, please open an issue on the GitHub repository. If you want to contribute code, please fork the repository and create a pull request.

## License
gptaapi is released under the MPL-2.0 License.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Naruno/GPT-Address-API",
    "name": "gpt-address-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">= 3",
    "maintainer_email": "",
    "keywords": "",
    "author": "Naruno Developers",
    "author_email": "onur.atakan.ulusoy@naruno.org",
    "download_url": "https://files.pythonhosted.org/packages/65/73/7aff97895dc70f7ba0fcc61305be0bd419617e4b0a284cdc64d448816e54/gpt_address_api-0.1.1.tar.gz",
    "platform": null,
    "description": "# GPT Address API (GPTAAPI) for Naruno\nGPTAAPI is a decentralized API for OpenAI GPT. It allows you to use GPT without exposing your API key to the public. It is based on the [Naruno](https://naruno.org/) blockchain and uses the [Naruno API](https://naruno.org/api/) to communicate with the blockchain. GPTAAPI is written in Python and uses the [OpenAI GPT-3 API](https://openai.com/blog/openai-api/) to communicate with GPT.\n\n## Features\n- Decentralized system\n- Secure communication between nodes\n- Fast and easy to use\n- Secure point for GPT API's\n- Uses encryption to protect sensitive information\n\n\n## Installation\nYou can install GPTAAPI by pip3:\n\n```console\npip3 install gpt_address_api\n```\n\n## Usage\n\n*If you want to use gpt_address_api you must to use Naruno. For now please checkout the [Baklava Testnet](https://naruno.org/baklava-testnet/).\n\nGetting address of client and server:\n```console\nnarunocli -pw\n```\n\n### Server\nFor accessing your gpt api on blockchain you should create a gpt_address_api, giving trusted user addresses and api_key.\n\n```python\nfrom gpt_address_api import gptaapi\n\nmy_gptaapi_server = gptaapi(\"MyNarunoPass\")\n\nmy_gptaapi_server.set_encrypt_key(\"mystrongencrypt_key\")\n\nmy_gptaapi_server.set_api_key(\"my_open_ai_api_key\")\n\nmy_gptaapi_server.add_user(\"client_address\")\n\nmy_gptaapi_server.run()\n```\n\nalso you can use in command line:\n```console\t\ngptaapi --password MyNarunoPass --encrypt_key \"mystrongencrypt_key\" --trusted_users [\"client_address\"] --api_key my_open_ai_api_key run\n```\n\n### Client\nTo use gptaapi, you can call the gptaapi.ask function with your blockchain address, message and encryption key as the parameter:\n\n```python\nfrom gpt_address_api import gptaapi\n\nmy_gptaapi_client = gptaapi(\"MyNarunoPass\")\n\nresponse = my_gptaapi_client.ask(\"server_address\", \"Hello gpt, how are you\", \"mystrongencrypt_key\")\n\nprint(response)\n\nmy_gptaapi_client.close()\n```\n\nalso you can use in command line:\n```console\t\ngptaapi --password \"MyNarunoPass\" ask \"server_address\" \"Hello gpt, how are you\" \"mystrongencrypt_key\"\n```\n\n\nThis will return the response of gpt result.\n\n## Contributing\nContributions to gptaapi are welcome! If you have any suggestions or find a bug, please open an issue on the GitHub repository. If you want to contribute code, please fork the repository and create a pull request.\n\n## License\ngptaapi is released under the MPL-2.0 License.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Decentralized GPT API for everyone !",
    "version": "0.1.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65737aff97895dc70f7ba0fcc61305be0bd419617e4b0a284cdc64d448816e54",
                "md5": "f766a4012138befc6f66c7ec617f0e95",
                "sha256": "7544a89683a0e003d6ffd38365d89a48ffe2ed291604c711649dcc0012b3eda1"
            },
            "downloads": -1,
            "filename": "gpt_address_api-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f766a4012138befc6f66c7ec617f0e95",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">= 3",
            "size": 8734,
            "upload_time": "2023-04-18T20:45:20",
            "upload_time_iso_8601": "2023-04-18T20:45:20.814610Z",
            "url": "https://files.pythonhosted.org/packages/65/73/7aff97895dc70f7ba0fcc61305be0bd419617e4b0a284cdc64d448816e54/gpt_address_api-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-18 20:45:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Naruno",
    "github_project": "GPT-Address-API",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "gpt-address-api"
}
        
Elapsed time: 0.07918s