How to use aiplatformpb GenerateContentRequest in Go (getting a 404)?

📅 发布时间:2026/7/12 11:35:16 👁️ 浏览次数:
How to use aiplatformpb GenerateContentRequest in Go (getting a 404)?
题意:如何在 Go 语言中使用 aiplatformpb 的 GenerateContentRequest(遇到 404 错误)?问题背景:I'm getting the following error when trying to use Gemini Pro via Go (1.22.1) and the aiplatform (1.64) package:我在通过Go 1.22.1和aiplatform 1.64包调用Gemini Pro时,出现了如下错误:rpc error: code = Unimplemented desc = unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type "text/html; charset=UTF-8"Here's my Golang code: 这是 我的 golang 代码:func googleGemini() string { ctx := context.Background()