Replies: 2 comments 1 reply
-
|
希望后续网页端复制进去后,自动格式化结构文本,目前挤在一起不是很美观 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
这个好像还没加到文档的模型服务商环境变量里 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
背景
Vertex AI 是 Google 的企业级 AI 服务,目前的呼声较高,因此做一下接入,这里做个记录。
设计思路
运行时
经过测试发现 Vertex AI 和 Google AI 的请求响应体基本一致,因此可以复用 Google AI 现有的处理逻辑,替换 client 即可。
鉴权方式
Vertex AI 的鉴权方式和 OpenAI 系列的有较大差别,需要通过一个 JSON 的秘钥来完成。由于在 Vercel 这样的平台中并不支持直接将 env 指定到文件,因此考虑提供两个环境变量分别支持。
VERTEXAI_CREDENTIALS: 用在 Vercel 上,直接复制粘贴秘钥字符串;GOOGLE_APPLICATION_CREDENTIALS: 直接指向秘钥路径,适合 Docker 部署;部署示例:
Vercel:
Docker:
$ docker run -d \ -p 34324:3210 \ --name lobe-chat-pglite \ -v /root/google/api-key.json:/app/api-key.json \ -e GOOGLE_APPLICATION_CREDENTIALS="/app/api-key.json" \ lobehub/lobe-chat-database进展
Beta Was this translation helpful? Give feedback.
All reactions