Comments (4)
你如果是境内本地开发,需要带上环境变量。
GEMINI_API_KEY={YOUR_TOKEN} API_BASE_URL={YOUR_API_BASE_URL} pnpm run dev
# 例:GEMINI_API_KEY=abc12345678 API_BASE_URL=https://xxxx.vercel.app pnpm run dev
from geminiprochat.
你如果是境内本地开发,需要带上环境变量。
GEMINI_API_KEY={YOUR_TOKEN} API_BASE_URL={YOUR_API_BASE_URL} pnpm run dev # 例:GEMINI_API_KEY=abc12345678 API_BASE_URL=https://xxxx.vercel.app pnpm run dev
非常感谢您的回答,我在vercel上部署了该项目,然后在.env里将vercel给的URL作为API_BASE_URL,如下:API_BASE_URL=https://youshibao-godgod126s-projects.vercel.app
不过还是得到“Fetch Fail”的反馈,跟Chatgpt 4.0对话了一天也没有解决。。。
-
如果你是Vercel部署,可以不使用.env文件,使用Vercel Project的环境变量即可。
-
注意
API_BASE_URL
指的是你反向代理Google PaLM API的地址,不是你自己搭建GeminiProChat的地址
反向代理的搭建:https://simonmy.com/posts/使用vercel反向代理google-palm-api.html
from geminiprochat.
你如果是境内本地开发,需要带上环境变量。
GEMINI_API_KEY={YOUR_TOKEN} API_BASE_URL={YOUR_API_BASE_URL} pnpm run dev # 例:GEMINI_API_KEY=abc12345678 API_BASE_URL=https://xxxx.vercel.app pnpm run dev
非常感谢您的回答,我在vercel上部署了该项目,然后在.env里将vercel给的URL作为API_BASE_URL,如下:API_BASE_URL=https://youshibao-godgod126s-projects.vercel.app
不过还是得到“Fetch Fail”的反馈,跟Chatgpt 4.0对话了一天也没有解决。。。
- 合并当前项目最新代码,几天前的版本.env识别是有缺陷的
修复详见:
Use Vite tools to obtain environment variables #24
replace openai_api_base_url to api_base_url #25- 如果你是Vercel部署,可以不使用.env文件,使用Vercel Project的环境变量即可。
- 注意
API_BASE_URL
指的是你反向代理Google PaLM API的地址,不是你自己搭建GeminiProChat的地址
反向代理的搭建:https://simonmy.com/posts/使用vercel反向代理google-palm-api.html
多谢
from geminiprochat.
本地服务器上部署的,在启动服务器的时候,需要加上--https
from geminiprochat.
Related Issues (20)
- GoogleGenerativeAIError: [405 Method Not Allowed]
- API key not valid. Please pass a valid API key。 HOT 2
- 为什么我部署了之后就可以直接聊天了?我的apikey都还没添加呢。 HOT 1
- 电脑本地运行报错:[GoogleGenerativeAI Error]: Error fetching from [404 Not Found] HOT 3
- 最新的创建的本地docker+Vercel回报405 Method NOT Allowed HOT 1
- vercel部署添加自定义域名出现重定向无法打开,vercel分配的域名正常,请问是哪里的问题 HOT 6
- Netlify部署失败,显示网站不安全
- Send button not working when submitting request on my fork. HOT 2
- gemini大模型 – google gemini中文官网
- 使用vercel和VPS的docker均报错 HOT 5
- 用美国VPS部署项目,但网页无法访问,提示SyntaxError: Unexpected identifier HOT 1
- 啥时候 能把图片上传的部分,给补上?
- 还在维护吗?
- 用最新pnpm組件self-deploying發生錯誤 HOT 2
- [Docker] User location is not supported for the API use. HOT 4
- 部署在Render上,dockerfile会报错,我已经修复,
- Gemini Pro API 收费会对本项目有影响吗 HOT 1
- how to config the chosen model? HOT 1
- Stream Mode needed
- 字数输出一直达不到要求,要求2000字,500字就没了。答复不完全。(用unraid部署的docker) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geminiprochat.