gemini3pro
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGemini 3 Pro Text & Vision
Gemini 3 Pro 文本与视觉功能
Usage
使用方法
Run from the user's current working directory (do NOT cd into the skill directory):
Text generation:
bash
uv run scripts/query_gemini.py --prompt "your question" [--system-prompt "instructions"] [--output "response.md"] [--api-key KEY]Image analysis (vision):
bash
uv run scripts/query_gemini.py --prompt "describe this image" --image "path/to/image.png" [--output "analysis.md"] [--api-key KEY]从用户当前工作目录运行(请勿切换到skill目录):
文本生成:
bash
uv run scripts/query_gemini.py --prompt "your question" [--system-prompt "instructions"] [--output "response.md"] [--api-key KEY]图像分析(视觉处理):
bash
uv run scripts/query_gemini.py --prompt "describe this image" --image "path/to/image.png" [--output "analysis.md"] [--api-key KEY]Parameters
参数说明
- /
--prompt(required): Question, task, or instructions-p - /
--image: Path to image for vision analysis (jpg, png, webp, gif)-i - /
--system-prompt: System instructions to set context/persona-s - /
--output: Save response to file (always prints to stdout too)-o - /
--api-key: API key (overrides-kenv var)GRSAI_API_KEY
- /
--prompt(必填):问题、任务或指令-p - /
--image:视觉分析所用图像的路径(支持jpg、png、webp、gif格式)-i - /
--system-prompt:用于设置上下文/角色的系统指令-s - /
--output:将响应保存到文件(同时始终输出到stdout)-o - /
--api-key:API密钥(会覆盖-k环境变量)GRSAI_API_KEY
API Key
API密钥
Provide via argument or set environment variable.
--api-keyGRSAI_API_KEY可通过参数提供,或设置环境变量。
--api-keyGRSAI_API_KEYTroubleshooting
故障排除
| Symptom | Resolution |
|---|---|
| Set |
| Wrong path or unreadable file; verify the path exists |
| HTTP 401 | Wrong or expired API key |
| API error; check prompt for policy violations |
| Install: |
For transient errors (HTTP 429, network timeouts), the script retries automatically up to 3 times. If retries are exhausted, surface the error to the user.
| 症状 | 解决方法 |
|---|---|
| 设置 |
| 路径错误或文件不可读;请验证路径是否存在 |
| HTTP 401 | API密钥错误或已过期 |
| API错误;检查提示内容是否违反政策 |
| 安装方法: |
对于临时错误(HTTP 429、网络超时),脚本会自动重试最多3次。若重试后仍失败,则向用户显示错误信息。
Output
输出
Print the response to stdout. Optionally save to file with . Do not pipe output unless the user asks.
--output将响应输出到stdout。可通过参数选择性保存到文件。除非用户要求,否则请勿通过管道传输输出。
--outputExamples
示例
bash
uv run scripts/query_gemini.py --prompt "Explain the difference between TCP and UDP in simple terms"bash
uv run scripts/query_gemini.py --prompt "What objects are in this image?" --image "photo.jpg" --output "analysis.md"bash
uv run scripts/query_gemini.py --prompt "Explain the difference between TCP and UDP in simple terms"bash
uv run scripts/query_gemini.py --prompt "What objects are in this image?" --image "photo.jpg" --output "analysis.md"