You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Gemini支持的生成式AI模型查询及权限报错问题求助

Google Gemini支持的生成式AI模型查询及权限报错问题求助

我刚踏入GenerativeAI领域没多久,最近试着加载一个预训练的文本生成模型,结果一直没搞定。我当时是这么写代码加载模型的:

from vertexai.generative_models import GenerativeModel
generation_model = GenerativeModel("gemini-pro")

因为这套代码跑不通,我琢磨着是不是得换个GenerativeAI模型,而不是死磕"gemini-pro"。于是我又写了一段代码,想看看Gemini到底支持哪些生成式模型:

import google.generativeai as genai
for model in genai.list_models():
    if 'generateContent' in model.supported_generation_methods:
        print(model.name)

结果这下更糟,直接弹出了PermissionDenied权限报错,报错界面里明确显示了权限拒绝的相关提示。

现在作为开发者,我有两个疑问:
Q1. [原提问内容未完整粘贴,暂留]

备注:内容来源于stack exchange,提问作者RLD

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 09:49:36