(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=43882905
Hacker News 上的一篇讨论围绕着使用 Google Gemini LLM API(尤其是在 Vertex AI 中)的诸多困难展开。原文已不可访问,但评论指出,多模态输入是一个挑战,需要使用 Node.js 的 `fs` API 和文件管理器进行变通,这对无服务器环境来说是个问题。
Simonw 建议绕过 Vertex AI,直接使用 HTTP API,因为它拥有更简单的 API 密钥和文档。一些用户更喜欢兼容 OpenAI 的端点,因为它集成更简单,但同时也指出它缺乏完整的特性,例如无法禁用“flash 2 thinking”。
Vertex AI 被定位为企业级解决方案,具有区域控制、服务认证和潜在的更低延迟等优势。其他评论批评了缺乏 OpenAPI 规范、依赖过时的 protobuf 定义以及 Google API 的整体上手难度。一位评论者对 Google 逐渐放弃 API-first 的策略表示遗憾,而另一位则认为 Gemini 2.5 通过具有竞争力的价格、长上下文模型和独特的特性,已经收回了失去的地位。总体而言,人们普遍认为 Google 的 LLM API,尤其是在 Vertex AI 中,使用起来非常令人沮丧。
That would all still be OK-ish except that their JS library only accepts a local path, which it then attempts to read using the Node `fs` API. Serverless? Better figure out how to shim `fs`!
It would be trivial to accept standard JS buffers. But it’s not clear that anyone at Google cares enough about this crappy API to fix it.
reply