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.

貢獻者指南