google-genai-sdk-python

v2026.09.25

Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI. Use for text generation, multimodal inputs, reasoning, tools, and media generation.

GitHub
安装命令
npx skhub add cnemri/google-genai-sdk-python
Markdown
SKILL.md

Google GenAI Python SDK Skill

Use this skill to write high-quality, idiomatic Python code for the Gemini API.

Reference Materials

Identify the user's task and refer to the relevant file:

  • Setup & Client: Installation, auth, client initialization.
  • Models: Recommended models (Flash, Pro, Lite, Imagen, Veo).
  • Text Generation: Basic inference, streaming, system instructions, safety.
  • Chat: Multi-turn conversations and history.
  • Reasoning: Thinking config (thinking_level / thinking_budget), thought signatures.
  • Structured Output: JSON schemas, Pydantic models, Enums.
  • Multimodal Inputs: Images, audio, video, PDFs, media resolution.
  • Tools: Function calling, code execution, Google Search grounding.
  • Media Generation: Image generation/editing (Imagen), video generation (Veo).
  • Source Code: Raw SDK source code for deep inspection.

Core Principles

  1. Unified SDK: Always use google-genai.
  2. Stateless Models: Use client.models for single requests.
  3. Stateful Chats: Use client.chats for conversations.
  4. Types: Import from google.genai.types.
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.25

发布时间

2026年9月25日

分类

未分类

许可证

MIT

源路径

skills/google-genai-sdk-python

默认分支

main

最新提交

7277476

Tree SHA

875338e