simonw/llm-gemini

No response and exit code is zero for PROHIBITED_CONTENT

Open

#80 创建于 2025年5月18日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)Python (52 fork)github user discovery
help wanted

仓库指标

Star
 (445 star)
PR 合并指标
 (PR 指标待抓取)

描述

The command like llm -m gemini-2.0-flash "prompt" -f "file.txt" returned no response nor any indication of a failure. llm version is 0.25

In responses table response field is empty. response_json is below:

{
    "promptFeedback": {
        "blockReason": "PROHIBITED_CONTENT"
    },
    "usageMetadata": {
        "promptTokenCount": 9311,
        "totalTokenCount": 9311,
        "promptTokensDetails": [
            {
                "modality": "TEXT",
                "tokenCount": 9311
            }
        ]
    },
    "modelVersion": "gemini-2.0-flash"
}

Additionally, these fields are null:

  • input_tokens
  • output_tokens
  • token_details

The quickest fix could be just output the json to stdout, so a user have a clue of what's going on.

贡献者指南