Closed juneix closed 4 months ago
默认的 gemini pro 不知道是啥版本,很笨,不太好用。最近谷歌已经开放gemini-1.5-pro的 api 申请了,我两个谷歌账号都申请成功了,应该还比较容易。希望可以增加gemini-1.5-pro-latest模型。
gemini-1.5-pro-latest
Gemini 1.5 Pro Waitlist申请地址 https://aistudio.google.com/app/waitlist/97445851
附上谷歌回复的邮件参考,调用地址是/v1beta,模型名是gemini-1.5-pro-latest
/v1beta
Gemini 1.5 Pro API You should now have API access to Gemini 1.5 Pro on the GCP project you shared with us! To get started: Create an API key generated from your allowlisted GCP Project. Run the list_models Python method or this cURL command: curl 'https://generativelanguage.googleapis.com/v1beta/models?key=' Check out our Gemini API cookbook or visit the Gemini API docs, open up the Python quickstart (or the programming language of your choice) and update code by replacing the model name with 'gemini-1.5-pro-latest'. Having access issues? Go to https://aistudio.google.com/app/apikey and confirm that the API key you are using is tied to your allowlisted Google Cloud Project.
你可以fork本项目,在utils/db.ts中增加此模型,并在server/api/gemini.post.ts中修改为以下代码
utils/db.ts
server/api/gemini.post.ts
const m = genAI.getGenerativeModel({model, safetySettings}, {apiVersion: 'v1beta'})
默认的 gemini pro 不知道是啥版本,很笨,不太好用。最近谷歌已经开放gemini-1.5-pro的 api 申请了,我两个谷歌账号都申请成功了,应该还比较容易。希望可以增加
gemini-1.5-pro-latest
模型。Gemini 1.5 Pro Waitlist申请地址 https://aistudio.google.com/app/waitlist/97445851
附上谷歌回复的邮件参考,调用地址是
/v1beta
,模型名是gemini-1.5-pro-latest