Skip to main content

Go ChatGPT

Quick start

「go_chatgpt」 是一个快速调用 openai chatgpt api 的网页封装

「go_subtitle」 is a quick call to openai chatgpt api web page encapsulation

Setup

项目需要运行在包含 python3.8.16 的环境中

The project needs runs in an environment containing python3.8.16

建议通过 miniconda 安装 python 以便管理环境

It is recommended to install python through miniconda to manage the environment

conda create -n chatgpt python=3.8 

你可以通过下面的命令安装此项目最新的版本

You can install the project latest version using the following command

# 从PyPI安装
pip install -U go_chatgpt

# 从GitHub安装
pip install git+https://github.com/RedHeartSecretMan/go_chatgpt.git

你需要创建 OpenAI 账号获取 api-key 以使用

You need to create an OpenAI account to get the api-key to use

项目中的 deploy 文件夹包含了在 Linux、macOS 和 Windows 平台上的快速部署脚本

The deploy folder in the project contains rapid deployment script for the Linux, macOS and Windows platforms

Docker

你可以通过以下命令获取 docker 镜像

You can obtain the docker image with the following command

docker pull 1046911101/go_chatgpt:0319 

你需要为该镜像创建一个容器并启动,常用的参数都被设置未了环境变量,根据需要调整

You need to create a container for the image and start it and the usual parameters are set to environment variables and adjusted as needed

docker run -e api_key="write_yourself_api_key_from_openai.com" -e request_method="official" --name go_chatgpt_0319 -p 7860:7860 -it 1046911101/go_chatgpt:0319

Tips: 其中默认的请求方法为 post 而 write_yourself_api_key_from_openai.com 应该是一串类似 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 的代码

如果网路无法访问则需要为容器设置代理,可以使用宿主机的代理服务

If the network is inaccessible, you need to set up a proxy for the container. You can use the proxy service of the host

docker run -e api_key="write_yourself_api_key_from_openai.com" -e proxy_name="192.168.1.7" -e proxy_port=7890 --name go_chatgpt_0319 -p 7860:7860 -it 1046911101/go_chatgpt:0319

Tips: 其中 192.168.1.7 是局域网中网关分配给宿主机的 IP 地址,7890 是宿主机被代理的端口,根据实际情况设置

End

项目现在是一个可用的demo,计划在23年6月份左右完善

The project is now an available demo, which is planned to be completed around June in 23

Metadata

Release files for go-chatgpt 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for go-chatgpt 0.0.6
File Size Uploaded Provenance Actions
go_chatgpt-0.0.6.tar.gz 14.4 kB Without provenance Details for go_chatgpt-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for go-chatgpt 0.0.6
File Interpreter ABI Platform Actions
go_chatgpt-0.0.6-py3-none-any.whl Python 3 none any Details for go_chatgpt-0.0.6-py3-none-any.whl

Total release size: 28.4 kB

Release files / go_chatgpt-0.0.6.tar.gz

Download URL go_chatgpt-0.0.6.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
250b7323272c82142188e57911db176b7221fa3c9247dceaf3e621fc7b9f3b8b
BLAKE2b-256 checksum
How to use checksums
fb66597085c44c15031b302f9e7525fd26336c77539a40b9e6bb6ac191493465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / go_chatgpt-0.0.6-py3-none-any.whl

Download URL go_chatgpt-0.0.6-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db220c0849ee4e9243dde4eb4c027c58f3f26b5e3c202c4322b26611f94f9660
BLAKE2b-256 checksum
How to use checksums
3879d5dec3e678acfd45322d14a1c99e7a934859d9e46d725774adbe8d9d1f78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Security for go-chatgpt 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page