google-genai-sdk-python

📁 cnemri/google-genai-skills 📅 13 days ago
36
总安装量
23
周安装量
#10449
全站排名
安装命令
npx skills add https://github.com/cnemri/google-genai-skills --skill google-genai-sdk-python

Agent 安装分布

gemini-cli 17
codex 15
opencode 13
claude-code 11
github-copilot 11

Skill 文档

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.