Open main menu
首页
专栏
课程
分类
归档
Chat
Sci-Hub
谷歌学术
Libgen
GitHub镜像
登录/注册
搜索
关闭
Previous
Previous
Next
Next
OpenAI 再放大招,ChatGPT 正式版 API 就是救世主尼奥,而我们都是愚蠢的人类
sockstack
/
292
/
2023-11-14 11:47:36
<p><span style="color: red; font-size: 18px">ChatGPT 可用网址,仅供交流学习使用,如对您有所帮助,请收藏并推荐给需要的朋友。</span><br><a href="https://ckai.xyz/?sockstack§ion=detail" target="__blank">https://ckai.xyz</a><br><br></p> <article class="_2rhmJa"><p>今天 OpenAI 公布了 ChatGPT 正式版 API,也就是说,<strong>这个最新的 API 与网页版 ChatGPT 背后用的是同一个 AI 模型</strong>,该模型被称为 gpt-3.5-turbo。</p> <p>相比于 GPT-3.5,<strong>gpt-3.5-turbo 的响应速度更快</strong>,具体快到什么程度呢?举个例子你就明白了。你们应该都看过 DC 的超英电影或者漫画吧?人类在超人和闪电侠眼里犹如龟速,根本不在一个段位。</p> <p><strong>现在 gpt-3.5-turbo 就像黑客帝国里面的救世主尼奥,而我们都是矩阵里那些愚蠢的人类。</strong></p> <p>更劲爆的是,ChatGPT API 价格比之前的 GPT-3.5 模型更便宜,而且不是便宜一点点,足足<strong>便宜了 90%!</strong></p> <p>体验了最新的 ChatGPT API 之后,我有一种预感,下一个<a href="https://links.jianshu.com/go?to=https%3A%2F%2Fzh.wikipedia.org%2Fzh-hans%2F%25E6%258A%2580%25E6%259C%25AF%25E5%25A5%2587%25E5%25BC%2582%25E7%2582%25B9" target="_blank">技术奇点</a>很快就会到来,人类社会将会发生翻天覆地的变化,搞不好就是<strong>第四次工业革命</strong>。</p> <p>放个视频给你们感受一下。。。</p> <p><strong>由于某些大家都懂得因素</strong>,很多人应该无缘体验 ChatGPT API,今天我给你提供一个体验的机会。</p> <p>就是上面视频中展现的 Web 界面,我直接部署好了提供给大家体验。</p> <p>地址:<strong><a href="https://links.jianshu.com/go?to=https%3A%2F%2Fchatgpt.icloudnative.io%2F" target="_blank">https://chatgpt.icloudnative.io/</a></strong></p> <p>本文完!</p> <p>当然,如果你想自己部署,完全没问题,该项目是开源的,地址:<a href="https://links.jianshu.com/go?to=https%3A%2F%2Fgithub.com%2FChanzhaoyu%2Fchatgpt-web" target="_blank">https://github.com/Chanzhaoyu/chatgpt-web</a></p> <p>什么?你想部署在 K8s 集群里?完全没问题,这就给你提供一个部署清单:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-yaml"><code class="yaml language-yaml"><span class="token comment"># chatgpt-web.yaml</span> <span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> apps/v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> Deployment <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">replicas</span><span class="token punctuation">:</span> <span class="token number">1</span> <span class="token key atrule">selector</span><span class="token punctuation">:</span> <span class="token key atrule">matchLabels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">template</span><span class="token punctuation">:</span> <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">containers</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> chenzhaoyu94/chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">imagePullPolicy</span><span class="token punctuation">:</span> Always <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">env</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> OPENAI_API_KEY <span class="token key atrule">value</span><span class="token punctuation">:</span> <span class="token punctuation">---</span> <span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> Service <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">sessionAffinity</span><span class="token punctuation">:</span> ClientIP <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> http <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">3002</span> <span class="token key atrule">targetPort</span><span class="token punctuation">:</span> <span class="token number">3002</span> <span class="token key atrule">selector</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre> </div> <ul> <li>value 的值请填写自己的 OpenAI API Key。</li> </ul> <p>然后执行以下命令即可:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-bash"><code class="bash language-bash">$ kubectl apply -f chatgpt-web.yaml <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> </div> <p>后面就不用再赘述了吧?K8s 玩家不可能不知道怎么访问自己的服务。</p> <p>什么?你是 <a href="https://links.jianshu.com/go?to=https%3A%2F%2Fgithub.com%2Flabring%2Fsealos" target="_blank">Sealos</a> 玩家?<strong>你想部署在 Sealos 集群中?</strong>那更简单了,我直接做好了集群镜像,直接运行一条命令就够了:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-bash"><code class="bash language-bash">$ sealos run yangchuansheng/chatgpt-web <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> </div> <p>没了。</p> <p>为什么这么神奇?这玩意叫“<strong>集群镜像</strong>”,它是这样构建出来的,首先需要准备一个 Kubefile(你没看错,和 Dockerfile 很像):</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-dockerfile"><code class="dockerfile language-dockerfile">FROM scratch COPY registry ./registry COPY manifests ./manifests CMD ["kubectl apply -f manifests/deployment.yaml", "kubectl apply -f manifests/service.yaml"] <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre> </div> <p>其中 deployment.yaml 和 service.yaml 就是上面的 Deployment 和 Service 部署清单。</p> <p>然后直接使用以下命令即可构建集群镜像:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-bash"><code class="bash language-bash">$ sealos build -t chatgpt-web:latest --platform linux/amd64 -f Kubefile . <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> </div> <p>是不是很神奇?事实上 <strong>Sealos 是把配置清单中用的镜像连同配置清单一起打包成了一个兼容 OCI 标准的镜像</strong>,你可以直接将它 push 到任意一个容器镜像仓库中,后续直接通过 sealos run 即可运行。</p> <p>什么?<strong>你既没有 K8s 集群,也没有 Sealos 集群,但就是想体验一下如何在 K8s 里部署这个服务?</strong>你有点过分哦,但也不是没有办法,直接使用 <a href="https://links.jianshu.com/go?to=https%3A%2F%2Fcloud.sealos.io%2F" target="_blank">Sealos Cloud</a> 即可。</p> <p>浏览器打开网站:<strong><a href="https://links.jianshu.com/go?to=https%3A%2F%2Fcloud.sealos.io%2F" target="_blank">https://cloud.sealos.io/</a></strong></p> <p>眼熟不?就像你的 Windows 操作系统一样。你可以把这个界面理解成 Windows 桌面,桌面上的图标就是每个应用的快捷方式。</p> <p>我们只需要双击 Terminal 快捷方式打开终端:</p> <div class="image-package"> <div class="image-container" style="max-width: 700px; max-height: 394px;"> <div class="image-container-fill" style="padding-bottom: 56.25%;"></div> <div class="image-view" data-width="3840" data-height="2160"><img referrerpolicy="no-referrer" data-original-src="//upload-images.jianshu.io/upload_images/15070444-f73fd719332819e4.png" data-original-width="3840" data-original-height="2160" data-original-format="image/jpeg" data-original-filesize="396447" data-image-index="0" style="cursor: zoom-in;" class="image-loading"></div> </div> <div class="image-caption"></div> </div> <p>然后新建部署清单 <code>chatgpt-web.yaml</code>,输入以下内容:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-yaml"><code class="yaml language-yaml"><span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> apps/v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> Deployment <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">replicas</span><span class="token punctuation">:</span> <span class="token number">1</span> <span class="token key atrule">selector</span><span class="token punctuation">:</span> <span class="token key atrule">matchLabels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">template</span><span class="token punctuation">:</span> <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">containers</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> chenzhaoyu94/chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">imagePullPolicy</span><span class="token punctuation">:</span> Always <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">resources</span><span class="token punctuation">:</span> <span class="token key atrule">requests</span><span class="token punctuation">:</span> <span class="token key atrule">cpu</span><span class="token punctuation">:</span> <span class="token number">0.1</span> <span class="token key atrule">memory</span><span class="token punctuation">:</span> 128Mi <span class="token key atrule">limits</span><span class="token punctuation">:</span> <span class="token key atrule">cpu</span><span class="token punctuation">:</span> <span class="token number">0.5</span> <span class="token key atrule">memory</span><span class="token punctuation">:</span> 128Mi <span class="token key atrule">env</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> OPENAI_API_KEY <span class="token key atrule">value</span><span class="token punctuation">:</span> sk<span class="token punctuation">-</span>oF1SUGz0DwKerLYOJNGBT3BlbkFJURLQdr48sWwZwAa0IVtw <span class="token punctuation">---</span> <span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> Service <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">sessionAffinity</span><span class="token punctuation">:</span> ClientIP <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> http <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">3002</span> <span class="token key atrule">targetPort</span><span class="token punctuation">:</span> <span class="token number">3002</span> <span class="token key atrule">selector</span><span class="token punctuation">:</span> <span class="token key atrule">app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token punctuation">---</span> <span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> networking.k8s.io/v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> Ingress <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">annotations</span><span class="token punctuation">:</span> <span class="token key atrule">kubernetes.io/ingress.class</span><span class="token punctuation">:</span> nginx <span class="token key atrule">nginx.ingress.kubernetes.io/rewrite-target</span><span class="token punctuation">:</span> / <span class="token key atrule">nginx.ingress.kubernetes.io/backend-protocol</span><span class="token punctuation">:</span> <span class="token string">"HTTP"</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">labels</span><span class="token punctuation">:</span> <span class="token key atrule">k8s-app</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">rules</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">host</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web.cloud.sealos.io <span class="token key atrule">http</span><span class="token punctuation">:</span> <span class="token key atrule">paths</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">pathType</span><span class="token punctuation">:</span> Prefix <span class="token key atrule">path</span><span class="token punctuation">:</span> / <span class="token key atrule">backend</span><span class="token punctuation">:</span> <span class="token key atrule">service</span><span class="token punctuation">:</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token key atrule">number</span><span class="token punctuation">:</span> <span class="token number">3002</span> <span class="token key atrule">tls</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> <span class="token key atrule">hosts</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> chatgpt<span class="token punctuation">-</span>web.cloud.sealos.io <span class="token key atrule">secretName</span><span class="token punctuation">:</span> wildcard<span class="token punctuation">-</span>cloud<span class="token punctuation">-</span>sealos<span class="token punctuation">-</span>io<span class="token punctuation">-</span>cert <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre> </div> <p>最后一步,<strong>创建快捷方式</strong>,只需准备一个部署清单,内容如下:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-yaml"><code class="yaml language-yaml"><span class="token comment"># app.yaml</span> <span class="token key atrule">apiVersion</span><span class="token punctuation">:</span> app.sealos.io/v1 <span class="token key atrule">kind</span><span class="token punctuation">:</span> App <span class="token key atrule">metadata</span><span class="token punctuation">:</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> chatgpt<span class="token punctuation">-</span>web <span class="token key atrule">spec</span><span class="token punctuation">:</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> ChatGPT Web <span class="token key atrule">icon</span><span class="token punctuation">:</span> <span class="token key atrule">type</span><span class="token punctuation">:</span> iframe <span class="token key atrule">data</span><span class="token punctuation">:</span> <span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//chatgpt<span class="token punctuation">-</span>web.cloud.sealos.io/ <span class="token key atrule">desc</span><span class="token punctuation">:</span> <span class="token key atrule">icon</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//raw.githubusercontent.com/Chanzhaoyu/chatgpt<span class="token punctuation">-</span>web/main/public/favicon.svg <span class="token key atrule">menuData</span><span class="token punctuation">:</span> <span class="token key atrule">nameColor</span><span class="token punctuation">:</span> text<span class="token punctuation">-</span>black <span class="token key atrule">helpDropDown</span><span class="token punctuation">:</span> <span class="token key atrule">helpDocs</span><span class="token punctuation">:</span> <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre> </div> <ul> <li>type: iframe 标识为一个 Web 应用;</li> <li>spec.name:桌面显示的名称;</li> <li>url:应用地址;</li> <li>icon:在 Desktop 上显示的图标。</li> </ul> <p>直接 apply 这个配置清单:</p> <div class="_2Uzcx_"> <button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewbox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers language-bash"><code class="bash language-bash">$ kubectl apply -f app.yaml <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> </div> <p>刷新浏览器,即可在桌面看到该 App 的快捷方式。</p> <div class="image-package"> <div class="image-container" style="max-width: 700px; max-height: 453px;"> <div class="image-container-fill" style="padding-bottom: 64.64%;"></div> <div class="image-view" data-width="3456" data-height="2234"><img referrerpolicy="no-referrer" data-original-src="//upload-images.jianshu.io/upload_images/15070444-f733144e10413210.png" data-original-width="3456" data-original-height="2234" data-original-format="image/jpeg" data-original-filesize="384088" data-image-index="1" style="cursor: zoom-in;" class="image-loading"></div> </div> <div class="image-caption"></div> </div> <p>直接双击这个图标,就可以打开 Web 页面啦。</p> <hr> <p>如果你真的按照上述步骤部署了该项目,你会发现服务根本就没办法正常运行,因为一个残酷的事实:<strong>你必须要魔法上网!</strong>😂</p> <p>本文不便透露与魔法上网的相关内容,这个问题需要大家自己解决。。</p> <p>只要你解决了该问题,就可以愉快地部署了。</p> <p>实在搞不定也没关系,直接使用我提供的 Demo 页面就可以免费体验:<strong><a href="https://links.jianshu.com/go?to=https%3A%2F%2Fchatgpt.icloudnative.io%2F" target="_blank">https://chatgpt.icloudnative.io/</a></strong></p> </article>
OpenAI 再放大招,ChatGPT 正式版 API 就是救世主尼奥,而我们都是愚蠢的人类
作者
sockstack
许可协议
CC BY 4.0
发布于
2023-11-14
修改于
2025-01-22
上一篇:软件:常用 Linux 软件汇总,值得收藏
下一篇:搭建一个chatgpt网页聊天界面
尚未登录
登录 / 注册
文章分类
博客重构之路
5
Spring Boot简单入门
4
k8s 入门教程
0
MySQL 知识
1
NSQ 消息队列
0
ThinkPHP5 源码分析
5
使用 Docker 从零开始搭建私人代码仓库
3
日常开发汇总
4
标签列表
springboot
hyperf
swoole
webman
php
多线程
数据结构
docker
k8s
thinkphp
mysql
tailwindcss
flowbite
css
前端