Coder Social home page Coder Social logo

panduoraz / gpt_api_free Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chatanywhere/gpt_api_free

0.0 0.0 0.0 335 KB

Free ChatGPT API Key,免费ChatGPT API,支持GPT4 API(低价),ChatGPT国内可用免费转发API,直连无需代理。可以搭配ChatBox等软件/插件使用,极大降低接口使用成本。国内即可无限制畅快聊天。

License: MIT License

JavaScript 100.00%

gpt_api_free's Introduction

GPT_API_free

GPT国内可用免费转发API,支持GPT4 API,直连无需代理。免费API可满足日常使用,可以在AutoGPT中使用,可以搭配ChatBox等软件/插件使用,极大降低接口使用成本。国内即可无限制畅快聊天。

完全免费使用

向国内开发者免费提供OpenAi接口调用,支持GPT3.5和Embedding模型。

免费API Key仅可用于个人非商业用途,教育,非营利性科研工作中。严禁商用!

为了该项目长久发展,免费API限制120请求/小时调用频率,还希望大家多多支持无限制的低价付费API

报错429就是请求频率被限制了

免费API Key:sk-0PfcSdT723UR44igwVxvEWvLoZJgi0FJyZWy0WCCATp5ka2a

免费key请勿用于 https://chatapi.chatanywhere.com.cn/ 会报错

该API Key用于转发API,需要将Host改为api.chatanywhere.cn或者api.chatanywhere.com.cn(国内首选)

特点

  1. 支持Models, Embedding, GPT3.5, GPT4(免费版不支持), DALLE(免费版不支持)。(免费版就可以支持AutoGPT)
  2. 支持流式答复。(即官网一样一个字一个字往外蹦)
  3. 无需科学上网,国内环境直接可用
  4. 完全免费使用。

付费版API

  1. 支持GPT4 API,价格仅官方价格五折。
  2. 性价比高,GPT3.5价格相当于官网价格七分之一。
  3. 同官网计费策略,流式问答使用tiktoken库准确计算Tokens,非流式问答直接使用官方返回Tokens用量计费。
  4. 余额不会过期,永久有效。根据用户反馈30块钱个人中度使用估计能用一年。

如何使用

最方便的使用方法

前往我们搭建的平台直接使用

https://chatapi.chatanywhere.com.cn/

免费Key请勿在这里使用,会报错too many requests

常见软件/插件使用方法

python openai官方库(使用AutoGPT等)

方法一

import openai
openai.api_base = "https://api.chatanywhere.com.cn/v1"
# openai.api_base = "https://api.chatanywhere.cn/v1"

方法二

修改环境变量OPENAI_API_BASE,各个系统怎么改环境变量请自行搜索,修改环境变量后不起作用请重启系统。

OPENAI_API_BASE=https://api.chatanywhere.com.cn/v1
或 OPENAI_API_BASE=https://api.chatanywhere.cn/v1

ChatBox(推荐使用)

ChatGPT开源桌面应用,支持全部桌面平台。

下载链接:https://github.com/Bin-Huang/chatbox/releases

使用方法:如图在设置中填入购买的密钥,并将代理设置为 https://api.chatanywhere.cn 或者 https://api.chatanywhere.com.cn 即可

浏览器插件ChatGPT Sidebar

官网链接:https://chatgpt-sidebar.com/

安装好插件后进入设置页面,如图所示修改设置,将url修改为 https://api.chatanywhere.cn 或者 https://api.chatanywhere.com.cn

Jetbrains插件ChatGPT

安装好插件后在Settings > Tools > OpenAI > GPT 3.5 Turbo中如图所示配置好插件,重点要将Server Settings 修改为 https://api.chatanywhere.cn/v1/chat/completions 或者 https://api.chatanywhere.com.cn/v1/chat/completions 。并勾选Customize Server。

VSCode插件Code GPT

这个插件修改Host相对麻烦一些,需要修改源码才可以使用。

  1. 安装插件。安装好后按Ctrl+Shift+P,弹出框中输入Open Extensions Floder

  2. 点击Extensions: Open Extensions Floder,这将打开插件目录,找到Code GPT的文件夹。

  3. 打开后进入打开文件./src/clients/openai_client.js,搜索文件中的api.openai.com,并替换为 api.chatanywhere.cn 或者 api.chatanywhere.com.cn。保存文件。

  4. 再次回到vscode,按Ctrl+Shift+P,弹出框中输入CodeGPT: Set API KEY,点击CodeGPT: Set API KEY。然后将购买的Key输入进去即可。

  5. 以上步骤完成后,重启VSCode

  • 其他VSCode插件类似。

隐私声明

该项目高度重视隐私,致力于保护其用户的隐私。该项目不会以任何方式收集、记录或存储用户输入的任何文本或由 OpenAI 服务器返回的任何文本。该项目不会向 OpenAI 或任何第三方提供有关 API 调用者的身份的任何信息,包括但不限于 IP 地址和用户代理字符串。

但OpenAI官方会根据其数据使用政策保留 30 天的数据。

gpt_api_free's People

Contributors

chatanywhere avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.