一键导入
google-genai-sdk-unified-v157
Standards and constraints for the unified google-genai library.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Standards and constraints for the unified google-genai library.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert in building, evaluating, and deploying AI agents using the Google ADK Python framework. Use this skill for writing agent logic, configuring multi-agent systems, and implementing tool integrations.
Advanced manipulation of text streams using the classic Unix power tools: awk and sed.
The discipline of writing robust, re-runnable system administration scripts that converge to a desired state.
Expertise in creating delightful, low-friction command-line interfaces using modern TUI principles.
Ensuring that code is well formatted
The art of identifying the root cause of software defects through heuristic analysis and logical deduction.
| name | google-genai-sdk-unified-v157 |
| description | Standards and constraints for the unified google-genai library. |
Standards and constraints for the unified google-genai library.
google-generativeai library is forbidden.client.aio.models.generate_content(...) for async operations.google-genai SDK, assume version 1.57 syntax.The user is utilizing the **Unified SDK**. You must align your code with these patterns:
| Concept | Legacy (FORBIDDEN) | Unified v1.57 (REQUIRED) |
| :--- | :--- | :--- |
| **Package** | `import google.generativeai` | `from google import genai` |
| **Client** | `genai.configure(...)` | `client = genai.Client(...)` |
| **Async** | `genai.ChatSession` | `client.aio.models.generate_content(...)` |
| **Methods** | `model.supported_methods` | `model.supported_actions` |
| **Config** | `generation_config={...}` | `config=types.GenerateContentConfig(...)` |
You are strictly forbidden from using `google.generativeai`. You must use the
unified `google-genai` library. Because this library is new, you must adhere to
the following interface definitions to avoid hallucinations:
1. **Import:** `from google import genai`
2. **Client:** `client = genai.Client(api_key=...)`
3. **List Models:**
```python
# CORRECT
for model in client.models.list():
print(model.name)
print(model.supported_actions) # NOT supported_methods
```
4. **Generation:**
```python
response = client.models.generate_content(
model='gemini-3-flash-preview',
contents='Hello'
)
print(response.text)
```
5. **Types:** Use `from google.genai import types` for type hinting config
objects.