Git Product home page Git Product logo

Comments (4)

antergone avatar antergone commented on July 24, 2024 1

你如果是境内本地开发,需要带上环境变量。

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.

antergone avatar antergone commented on July 24, 2024

你如果是境内本地开发,需要带上环境变量。

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对话了一天也没有解决。。。

  1. 合并当前项目最新代码,几天前的版本.env识别是有缺陷的
    修复详见:
    #24
    #25

  2. 如果你是Vercel部署,可以不使用.env文件,使用Vercel Project的环境变量即可。

  3. 注意API_BASE_URL指的是你反向代理Google PaLM API的地址,不是你自己搭建GeminiProChat的地址
    反向代理的搭建:https://simonmy.com/posts/使用vercel反向代理google-palm-api.html

from geminiprochat.

GODGOD126 avatar GODGOD126 commented on July 24, 2024

你如果是境内本地开发,需要带上环境变量。

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对话了一天也没有解决。。。

  1. 合并当前项目最新代码,几天前的版本.env识别是有缺陷的
    修复详见:
    Use Vite tools to obtain environment variables #24
    replace openai_api_base_url to api_base_url #25
  2. 如果你是Vercel部署,可以不使用.env文件,使用Vercel Project的环境变量即可。
  3. 注意API_BASE_URL指的是你反向代理Google PaLM API的地址,不是你自己搭建GeminiProChat的地址
    反向代理的搭建:https://simonmy.com/posts/使用vercel反向代理google-palm-api.html

多谢

from geminiprochat.

pankejia2000 avatar pankejia2000 commented on July 24, 2024

本地服务器上部署的,在启动服务器的时候,需要加上--https

from geminiprochat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.