Jazee6 / cloudflare-ai-web

支持Gemini Pro / Cloudflare Workers AI / ChatGPT的融合Web平台
https://ai.jaze.top
Apache License 2.0
1.87k stars 471 forks source link

求教大佬们,在哪里添加自己的openai和gemini的api key? #37

Closed xdl2015 closed 4 months ago

xdl2015 commented 4 months ago

在对话页面的设置按钮中只有填写openai api key的选项,但是填写后依然无法使用chatgpt,gemini的api连填写的地方都没有,实在不知道怎么办?只好向大佬们求助,谢谢解答

snake-git commented 4 months ago

在对话页面的设置按钮中只有填写openai api key的选项,但是填写后依然无法使用chatgpt,gemini的api连填写的地方都没有,实在不知道怎么办?只好向大佬们求助,谢谢解答

按照大佬的教程填写: 0000

snake-git commented 4 months ago

在你部署的 Vercel.com 里面的环境变量填:https://vercel.com/

xdl2015 commented 4 months ago

在你部署的 Vercel.com 里面的环境变量填:https://vercel.com/ 我是这样设置的 但是聊天页面返回这段错误提示,大佬能指点一下是什么原因吗?

500 {"url":"/api/gemini","statusCode":500,"statusMessage":"","message":"[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse: [400 Bad Request] API key not valid. Please pass a valid API key. [{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\",\"reason\":\"API_KEY_INVALID\",\"domain\":\"googleapis.com\",\"metadata\":{\"service\":\"generativelanguage.googleapis.com\"}}]","stack":""} screencapture-verce

snake-git commented 4 months ago

在你部署的 Vercel.com 里面的环境变量填:https://vercel.com/ 我是这样设置的 但是聊天页面返回这段错误提示,大佬能指点一下是什么原因吗?

500 {"url":"/api/gemini","statusCode":500,"statusMessage":"","message":"[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse: [400 Bad Request] API key not valid. Please pass a valid API key. [{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"API_KEY_INVALID","domain":"googleapis.com","metadata":{"service":"generativelanguage.googleapis.com"}}]","stack":""} screencapture-verce

错误提示是你的gemini key 失效了。去重新申请个试试。

xdl2015 commented 4 months ago

在你部署的 Vercel.com 里面的环境变量填:https://vercel.com/ 我是这样设置的 但是聊天页面返回这段错误提示,大佬能指点一下是什么原因吗?

500 {"url":"/api/gemini","statusCode":500,"statusMessage":"","message":"[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse: [400 Bad Request] API key not valid. Please pass a valid API key. [{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"API_KEY_INVALID","domain":"googleapis.com","metadata":{"service":"generativelanguage.googleapis.com"}}]","stack":""} screencapture-verce

错误提示是你的gemini key 失效了。去重新申请个试试。

我可是刚申请的Gemini 的API key 有点懵了……