type
status
date
slug
summary
tags
category
icon
password
Property
Aug 25, 2023 05:15 PM
URL
GPT4 模型是目前最强的人工智能模型,但是它的售价很贵,OpenAI 的定价是 20$ (约合 140 人民币), 如果你使用 api 那么会更贵,大概问一次 1 块钱人民币,我等白嫖党用不起。
现在有一个办法可以用到免费的 GPT4 模型
1. 准备工作
1.1 注册
注册 GitHub 和 Vercel 的账号
GitHub
vercel
1.2 Discord 获取 api key
注册 Discord 账号
然后使用下面的链接
进入 ChimeraGPT 获取免费的 api key,像我下面一样操作
把下面的的保存起来,记住
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F39da4a3c-9661-48e8-b7cf-2f0b184f3926%2FUntitled.png?table=block&id=03c234fa-9225-4c2c-bbdc-eba99339407f&t=03c234fa-9225-4c2c-bbdc-eba99339407f&width=336&cache=v2)
至此我们的准备工作完成了
2. 部署
2.1 Fock 项目
打开下面的 GitHub 项目
fgpt
hihumanzone • Updated Aug 22, 2023
然后点击 Fock
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F26c18d3b-cdca-45c3-b3ef-56f8e433d134%2FUntitled.png?table=block&id=f14c0f0a-9dd5-4528-8a3f-cd105ab67ef7&t=f14c0f0a-9dd5-4528-8a3f-cd105ab67ef7&width=528&cache=v2)
这样在你的 GitHub 中就能找到 fgpt 这个项目了
2.2 vercel 部署
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd9c0914d-95fb-4f4a-b2c9-05746f150eca%2FUntitled.png?table=block&id=2c0a27e5-ba9c-4cbf-b3a4-85616f3438eb&t=2c0a27e5-ba9c-4cbf-b3a4-85616f3438eb&width=576&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff113975c-dcad-4c1d-aff4-9d43e2f90d61%2FUntitled.png?table=block&id=8197d4cd-a020-4398-835b-646295d11ab3&t=8197d4cd-a020-4398-835b-646295d11ab3&width=576&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F93738051-4b07-4e90-bd90-e2b0529945ef%2FUntitled.png?table=block&id=9aebf0bb-921b-47c8-89a8-874c858553a3&t=9aebf0bb-921b-47c8-89a8-874c858553a3&width=576&cache=v2)
等待部署完成,大概2分钟左右,然后点击他给你的网址,你就能打开你的网页了
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fee76960c-330d-4d58-955e-67ad4564741a%2FUntitled.png?table=block&id=f7e785e7-674c-4b67-83a8-c81763dd044a&t=f7e785e7-674c-4b67-83a8-c81763dd044a&width=2632&cache=v2)
2.3 环境变量配置
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7045ff24-a1a4-4787-8a34-17fa4348a2a6%2FUntitled.png?table=block&id=548af2ce-4c23-4005-bd83-6151ee6e96f0&t=548af2ce-4c23-4005-bd83-6151ee6e96f0&width=2116&cache=v2)
增加四个环境变量如下所示
Key | Value | 解释 |
NEXT_PUBLIC_DEFAULT_TEMPERATURE | 0.8 | 0.8 最好没有为什么 |
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT | You are ChatGPT, a large language model trained by OpenAI.
Knowledge cutoff: 2021-09
Current date: 2023-07 | 默认的提示词,我这种写法可以让 api 的说法和网页版差不多 |
DEFAULT_MODEL | gpt-4 | 默认的模型 |
OPENAI_API_KEY | tO_r*****LKqmcdk_6J0mo2hclo__NRsyQ | 这是在步骤 1.2 中得到的 key |
接下来就是重新部署,让环境变量生效
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fdabc65dc-22df-4fe7-ac86-08d4f50256b2%2FUntitled.png?table=block&id=9ff8cee5-a36d-4c92-b561-698d05dfb700&t=9ff8cee5-a36d-4c92-b561-698d05dfb700&width=528&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F970e14c3-3798-437f-8642-1f83d1dd9b9b%2FUntitled.png?table=block&id=2ebe4617-df3e-444f-bb9c-76a67a34d283&t=2ebe4617-df3e-444f-bb9c-76a67a34d283&width=528&cache=v2)
最后重新打开你部署的网址就能用了,有很多模型可以选择
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb428a09f-d6a6-4693-ba5b-ba3b97142d32%2FUntitled.png?table=block&id=a510550a-0bb7-4357-8207-5f93e0e388f3&t=a510550a-0bb7-4357-8207-5f93e0e388f3&width=480&cache=v2)
但是需要注意的是,根据 ChimeraGPT 的说法,可以打开这个网址(点我打开)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F698e2676-22fb-4edf-b59e-ac294c9b36e7%2FUntitled.png?table=block&id=edba9928-fa8f-433b-b734-7fcbd9492e0d&t=edba9928-fa8f-433b-b734-7fcbd9492e0d&width=384&cache=v2)
拿其中一个来说, 10/minute 代表一分钟只能提问10次1000/day 表示一天之内问1000次,对于个人来说是足够的
3. 高级用户
这是开发者看的,普通用户不用看,给出一个 python 调用他的 api 的实例
- 作者:我心永恒
- 链接:https://wxyhgk.com/article/GPT4-ChimeraGPT
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。