{"id":570872,"date":"2024-03-02T13:45:44","date_gmt":"2024-03-02T05:45:44","guid":{"rendered":"http:\/\/4563.org\/?p=570872"},"modified":"2024-03-02T13:45:44","modified_gmt":"2024-03-02T05:45:44","slug":"%e3%80%90%e5%bb%89%e4%bb%b7-gpt4%e3%80%91%e5%b0%86-github-copilot-%e8%bd%ac%e6%8d%a2%e4%b8%ba%e5%8f%af%e4%bb%a5%e4%bd%bf%e7%94%a8-gpt4-%e7%9a%84-api","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=570872","title":{"rendered":"\u3010\u5ec9\u4ef7 GPT4\u3011\u5c06 GitHub Copilot \u8f6c\u6362\u4e3a\u53ef\u4ee5\u4f7f\u7528 GPT4 \u7684 API"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>YukinoCoco<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 13:44:00\t<\/p>\n<h3>\u3010\u5ec9\u4ef7 GPT4\u3011\u5c06 GitHub Copilot \u8f6c\u6362\u4e3a\u53ef\u4ee5\u4f7f\u7528 GPT4 \u7684 API<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 YukinoCoco \u4e8e 2024-2-10 17:14 \u7f16\u8f91 <\/p>\n<p> 0. \u524d\u8a00<br \/>  \u63a8\u5e7f\u4e00\u4e0b\u6211\u7684 Copilot \u6708\u629b\u53f7\uff0c\u53ea\u552e \uffe59.9\uff1ahttps:\/\/kfaka.ru\/<br \/>  \u4e0d\u8981\u7528\u5927\u53f7\u4e0a\u8f66\uff0c\u4e0d\u8981\u5171\u4eab\u4f7f\u7528\uff0c\u6240\u4ee5\u6708\u629b\u53f7\u975e\u5e38\u5408\u9002\u7528\u6765\u73a9\u8fd9\u4e2a\uff0c\u6211\u5c311\u4e2a\u53f7\u76ee\u524d\u8fd8\u6ca1\u7ffb\u8f66<br \/>  \u73b0\u5728\u6211\u5b98\u65b9\u7684 GPT4 \u90fd\u6ca1\u7eed\u8d39\u4e86\uff0c\u5b83\u6bd4\u76f4\u63a5\u5728\u5b98\u65b9 GPT4 \u5bf9\u8bdd\u5feb\uff0c\u8fd8\u4fbf\u5b9c\uff0c\u611f\u89c9\u4e0d\u9519<br \/>  \u4f7f\u7528\u65b9\u6cd5\u770b\u4e0b\u9762\u7684\u6559\u7a0b\uff0c\u5e94\u8be5\u662f\u6bd4\u8f83\u8be6\u7ec6\u4e86\u3002<\/p>\n<p>  \u4e0d\u8981\u628a\u540e\u7aef\u90e8\u7f72\u5728\u5927\u5382\uff08AWS\u3001GCP \u7b49\u7b49\uff09\u673a\u5668\u4e0a\uff0c\u5c3d\u91cf\u4e0d\u8981\u7528\u673a\u573a\u7684 IP \u53bb\u767b\u5f55\u8fd9\u4e2a\u53f7\uff0c\u5982\u679c\u673a\u573a IP \u6709\u4eba\u88ab\u5c01\u8fc7\u53f7\uff0c\u4f1a\u88ab\u8fde\u5e26\u5c01\u53f7\u3002\u73a9 GPT4 \u62ff\u5230 TOKEN \u4e4b\u540e\u5c31\u628a\u53f7\u9000\u4e86\uff0c\u4e0d\u8981\u628a Cookie \u7559\u5728\u6d4f\u89c8\u5668\u4e0a\u3002<\/p>\n<p>  1. \u5b89\u88c5<br \/>  \u4f7f\u7528 Docker \u5b89\u88c5 aaamoon\/copilot-gpt4-service<br \/>  \u6765\u81ea\uff1ahttps:\/\/github.com\/aaamoon\/copilot-gpt4-service<br \/>  docker run -d <br \/>  &#8211;name copilot-gpt4-service <br \/>  &#8211;restart always <br \/>  -p 8099:8080 <br \/>  -e HOST=0.0.0.0 <br \/>  aaamoon\/copilot-gpt4-service:latest<br \/>  \u8fd9\u91cc\u5c06\u4f7f\u7528 http:\/\/your_ip:8099 \u4f5c\u4e3a API \u63a5\u53e3<br \/>  2. \u83b7\u53d6 Copilot Token<br \/>  \u5982\u679c\u5df2\u7ecf\u6709 TOKEN \u4e86\uff0c\u8fd9\u4e00\u6b65\u4e0d\u7528\u8d70\uff0c\u76f4\u63a5\u8df3\u5230 3. \u4f7f\u7528\u670d\u52a1\u3002<br \/>  \u9996\u5148\uff0c\u5b89\u88c5 requests \u5e93\uff1a<br \/>  pip install requests<br \/>  sudo apt install python3-requests # \u5982\u679c\u662f Debian 12+ \u7684\u7cfb\u7edf<br \/>  \u7136\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u83b7\u53d6 GitHub Copilot \u63d2\u4ef6\u7684 Token\uff1a<br \/>  python3 &lt;(curl -fsSL https:\/\/raw.githubusercontent.com\/aaamoon\/copilot-gpt4-service\/master\/shells\/get_copilot_token.py)<br \/>  \u8f93\u51fa\u7c7b\u4f3c\u4e8e\uff1a<br \/>  $ python3 get_copilot_token.py<br \/>  Please open https:\/\/github.com\/login\/device in browser and enter 6A95-CAC9 to login.<br \/>  # \u8fd9\u91cc\u8bbf\u95ee https:\/\/github.com\/login\/device \u586b\u5165 6A95-CAC9\uff08\u6839\u636e\u4f60\u4e0a\u9762\u7684\u8f93\u51fa\u51b3\u5b9a\uff09<br \/>  Your token is:<br \/>  ghu_xxxxxxxxxxxxxxxx<br \/>  # \u8fd9\u91cc\u7684 ghu_xxxxxxxxxxxxxxxx \u5c31\u662f\u6700\u540e\u7684 TOKEN<br \/>  \u7136\u540e\u6d4f\u89c8\u5668\u8bbf\u95ee https:\/\/github.com\/login\/device \uff0c\u586b\u5165\u6388\u6743\u7801\u5373\u53ef\u5f97\u5230 Token\u3002<br \/>  https:\/\/niconiacg.visualstudio.com\/a158c0e6-f968-4c72-b336-690f5a7c8b4c\/_apis\/git\/repositories\/f4cb0aa8-76ef-49d2-bee3-9a3deda56975\/items?path=\/2024\/0\/6\/b0186834be29.png&amp;$format=octetStream&amp;api-version=5.0<\/p>\n<p>  3. \u4f7f\u7528\u670d\u52a1<br \/>  1. \u901a\u8fc7 ChatGPT-Next-Web \u90e8\u7f72<br \/>  docker run -d -p 3000:3000 <br \/>  &nbsp; &nbsp;-e OPENAI_API_KEY=ghu-xxxx <br \/>  &nbsp; &nbsp;-e CODE=your-password <br \/>  &nbsp; &nbsp;-e BASE_URL=http:\/\/your_ip:8099 <br \/>  &nbsp; &nbsp;yidadaa\/chatgpt-next-web<br \/>  \u7136\u540e\u8bbf\u95ee http:\/\/your_ip:3000 \u5c31\u80fd\u4f7f\u7528\u4e86\uff01<\/p>\n<p>  \u5982\u679c\u914d\u7f6e\u4e86 OPENAI_API_KEY\u3001BASE_URL \u4ee5\u53ca CODE \u53ef\u4ee5\u8f93\u5165\u4e0a\u9762\u7684 your-password \uff0c\u7136\u540e\u5230\u8bbe\u7f6e\u5c06\u6a21\u578b\u4fee\u6539\u4e3a gpt-4\uff0c\u5c31\u80fd\u4f7f\u7528\u4e86\u3002<br \/>  https:\/\/niconiacg.visualstudio.com\/a158c0e6-f968-4c72-b336-690f5a7c8b4c\/_apis\/git\/repositories\/f4cb0aa8-76ef-49d2-bee3-9a3deda56975\/items?path=\/2024\/0\/6\/77d6ea61edad.png&amp;$format=octetStream&amp;api-version=5.0<br \/>  \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u6216\u8005\u5bc6\u94a5\u8fc7\u671f\uff0c\u53ef\u4ee5\u624b\u52a8\u8f93\u5165 API \u7f51\u5740\u548c TOKEN<br \/>  https:\/\/niconiacg.visualstudio.com\/a158c0e6-f968-4c72-b336-690f5a7c8b4c\/_apis\/git\/repositories\/f4cb0aa8-76ef-49d2-bee3-9a3deda56975\/items?path=\/2024\/0\/6\/5285307c7f79.png&amp;$format=octetStream&amp;api-version=5.0<\/p>\n<p>  \u73b0\u5728\u53ef\u4ee5\u4f7f\u7528\u4e86\uff1a<\/p>\n<p>  https:\/\/niconiacg.visualstudio.com\/a158c0e6-f968-4c72-b336-690f5a7c8b4c\/_apis\/git\/repositories\/f4cb0aa8-76ef-49d2-bee3-9a3deda56975\/items?path=\/2024\/0\/6\/a795751ea3c4.png&amp;$format=octetStream&amp;api-version=5.0<\/p>\n<p>  \u53ef\u4ee5\u4f7f\u7528 openai API \u7684\u5730\u65b9\u90fd\u80fd\u7528\uff0c\u6bd4\u5982 Chrome Sider \u63d2\u4ef6\u3001obsidian\u3001chatbox \u7b49\u7b49\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llyy<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:03:04\t<\/p>\n<h3><\/h3>\n<p>  \t\tCopilot\u4e0d\u662f\u514d\u8d39\u5417\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>supervps<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:44:22\t<\/p>\n<h3><\/h3>\n<p>  \t\thttps:\/\/img.lw.al\/file\/92c18060991ed76ae120a.png.<br \/>  \u52a0\u4e0a\u4e86 :lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>YukinoCoco<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:35:25\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 YukinoCoco \u4e8e 2024-1-13 21:57 \u7f16\u8f91 <\/p>\n<p> \u6539\u5929 T \u4e2a\u697c\uff0c\u7ed9\u5927\u5bb6\u9001\u51e0\u4e2a\u73a9\u73a9\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>YukinoCoco<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 13:50:51\t<\/p>\n<h3><\/h3>\n<p>  \t\tsupervps \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 13:47<br \/>  \u6b63\u597d\u6709\u4e2a\u5b66\u751f\u53f7 \u6211\u53bb\u8bd5\u8bd5 \u611f\u8c22\u5206\u4eab<\/p>\n<p> \u54c8\u54c8\u54c8\uff0c\u5feb\u53bb\u8bd5\u8bd5\u770b\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>supervps<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 13:47:07\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6b63\u597d\u6709\u4e2a\u5b66\u751f\u53f7 \u6211\u53bb\u8bd5\u8bd5 \u611f\u8c22\u5206\u4eab\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>333333333<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 13:59:25\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7ed1\u5b9a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ageg<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:09:31\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e5f\u5c31\u5f53\u73a9\u5177\u73a9\u73a9\u3002\u3002\u8fd9\u79cd\u8fdf\u65e9\u8981\u5c01\u3002\u6ca1\u5fc5\u8981\u6d6a\u8d39\u65f6\u95f4\u5f04\u8fd9\u4e2a\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>YukinoCoco<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:09:47\t<\/p>\n<h3><\/h3>\n<p>  \t\tllyy \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:03<br \/>  Copilot\u4e0d\u662f\u514d\u8d39\u5417<\/p>\n<p> GitHub Copilot\uff0c\u4e0d\u662f\u5fae\u8f6f\u90a3\u4e2a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5343\u624b\u5982\u6765<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:24:50\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6211\u73b0\u5728\u7528\u7684gmini \u901f\u5ea6\u4e5f\u5feb \u6587\u7ae0\u6548\u679c\u66f4\u597d\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5361\u5c14<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:28:55\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5343\u624b\u5982\u6765 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2024-1-13 14:24<br \/>  \u6211\u73b0\u5728\u7528\u7684gmini \u901f\u5ea6\u4e5f\u5feb \u6587\u7ae0\u6548\u679c\u66f4\u597d<\/p>\n<p> gmini\u662f\u54ea\u5bb6\u7684\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>YukinoCoco \u5927\u4f6c\u6709\u8bdd\u8bf4 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/570872"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=570872"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/570872\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=570872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=570872"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=570872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}