去评论
dz插件网

【廉价 GPT4】将 GitHub Copilot 转换为可以使用 GPT4 的 API

镖师
2024/01/13 20:41:10
0. 鍓嶈█
鎺ㄥ箍涓涓嬫垜鐨 Copilot 鏈堟姏鍙凤紝鍙敭 锟9.9锛歨ttps://kfaka.ru/
涓嶈鐢ㄥぇ鍙蜂笂杞︼紝涓嶈鍏变韩浣跨敤锛屾墍浠ユ湀鎶涘彿闈炲父鍚堥傜敤鏉ョ帺杩欎釜锛屾垜灏1涓彿鐩墠杩樻病缈昏溅
鐜板湪鎴戝畼鏂圭殑 GPT4 閮芥病缁垂浜嗭紝瀹冩瘮鐩存帴鍦ㄥ畼鏂 GPT4 瀵硅瘽蹇紝杩樹究瀹滐紝鎰熻涓嶉敊
浣跨敤鏂规硶鐪嬩笅闈㈢殑鏁欑▼锛屽簲璇ユ槸姣旇緝璇︾粏浜嗐

1. 瀹夎
浣跨敤 Docker 瀹夎 aaamoon/copilot-gpt4-service
鏉ヨ嚜锛歨ttps://github.com/aaamoon/copilot-gpt4-service
  1. docker run -d \  --name copilot-gpt4-service \  --restart always \  -p 8099:8080 \  -e HOST=0.0.0.0 \  aaamoon/copilot-gpt4-service:latest
杩欓噷灏嗕娇鐢 http://your_ip:8099 浣滀负 API 鎺ュ彛
2. 鑾峰彇 Copilot Token
閫氳繃 Github Copilot CLI 鑾峰彇 Token
  1. # 濡備笅鑴氭湰浼氳嚜鍔ㄥ畨瑁 Github Copilot CLI 骞堕氳繃鎺堟潈鑾峰彇 Github Copilot Plugin Token bash -c "$(curl -fsSL https://raw.githubusercontent.com/aaamoon/copilot-gpt4-service/master/shells/get_copilot_token.sh)"
鎺ヤ笅鏉ラ夋嫨 2.  Get Github Copilot token by Github Copilot CLI 锛岀劧鍚庢祻瑙堝櫒璁块棶 https://github.com/login/device 锛屽~鍏ユ巿鏉冪爜鍗冲彲寰楀埌 Token銆
  1. $ bash -c "$(curl -fsSL https://raw.githubusercontent.com/aaamoon/copilot-gpt4-service/master/shells/get_copilot_token.sh)"Github Copilot token Tools [v0.0.2] # 1. 杩欓噷瑕侀夋嫨 2>    Get Github Copilot token Tools [v0.0.2]    鈥斺斺斺斺斺斺斺斺斺斺斺斺斺斺斺-    1.  Get Github Copilot token by IDEA Github Copilot plugin    2.  Get Github Copilot token by Github Copilot CLI    鈥斺斺斺斺斺斺斺斺斺斺斺斺斺斺斺-    0.  ExitPlease enter a number [0-2]: 2github-copilot-cli is not installed. Installing...added 247 packages, and audited 248 packages in 32s54 packages are looking for funding  run `npm fund` for details2 moderate severity vulnerabilitiesTo address all issues (including breaking changes), run:  npm audit fix --forceRun `npm audit` for details.npm noticenpm notice New major version of npm available! 8.19.2 -> 10.3.0npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.3.0npm notice Run npm install -g [email聽protected] to update!npm noticeGithub Copilot CLI token not found. Please authorize.Copy this code: 1FBE-97DC # 2. 娴忚鍣ㄨ闂 https://github.com/login/device锛岀劧鍚庡~鍏ヨ繖涓 CODEThen go to https://github.com/login/device, paste the code in and approve the access.Failed to authenticate: You do not have access to GitHub Copilot CLI. Please join the waitlist at https://githubnext.com/projects/copilot-cli/., Unable to verify waitlist access.Your Github Copilot CLI token : <your token>* Press Enter to return to the main menu. *



3. 浣跨敤鏈嶅姟
1. 閫氳繃 ChatGPT-Next-Web 閮ㄧ讲
  1. docker run -d -p 3000:3000 \   -e OPENAI_API_KEY=ghu-xxxx \   -e CODE=your-password \   -e BASE_URL=http://your_ip:8099 \   yidadaa/chatgpt-next-web
鐒跺悗璁块棶 http://your_ip:3000 灏辫兘浣跨敤浜嗭紒

濡傛灉閰嶇疆浜 OPENAI_API_KEY銆丅ASE_URL 浠ュ強 CODE 鍙互杈撳叆涓婇潰鐨 your-password 锛岀劧鍚庡埌璁剧疆灏嗘ā鍨嬩慨鏀逛负 gpt-4锛屽氨鑳戒娇鐢ㄤ簡銆




濡傛灉娌℃湁閰嶇疆鐜鍙橀噺鎴栬呭瘑閽ヨ繃鏈燂紝鍙互鎵嬪姩杈撳叆 API 缃戝潃鍜 TOKEN


鐜板湪鍙互浣跨敤浜嗭細