Code Monkey home page Code Monkey logo

cocopilot2gpt's Introduction

将你的 copilot 转成 ChatGPT API(支持GPT4)

ghu token 获取

通过 cocoilot 获取

点击链接:cocopilot,根据提示拿到 ghu_xxxx 格式的 token。务必保存好,不要泄露给其他人。

自己部署的应用获取

地址: http://localhost:8081/auth

docker 部署

docker run -d -p 8081:8081 ersichub/copilot2gpt

下载程序

点击右侧的 release 下载跟你运行环境一致的可执行文件

运行程序

cp .env.example .env

./copilot2gpt

默认监听端口为 8081,可以在 .env 中修改

使用方式

可以在任意第三方客户端使用

API 域名:http://127.0.0.1:8081

API token:ghu_xxx

curl 测试

curl --location 'http://127.0.0.1:8081/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ghu_xxx' \
--data '{
  "stream": true,
  "model": "gpt-4",
  "messages": [{"role": "user", "content": "hi"}]
}'
curl --location 'http://127.0.0.1:8081/v1/embeddings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ghu_xxx' \
--data '{
  "input":["Your text string goes here"],
  "model":"text-embedding-ada-002"
  }'

程序打包

./build.sh version

感谢以下项目,灵感来自于VV佬

CaoYunzhou/cocopilot-gpt

lvguanjun/copilot_to_chatgpt4

cocopilot2gpt's People

Contributors

ljnchn avatar mrdgbot 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.