什么是 gemini-interactions-api?
在编写调用 Gemini API 进行文本生成、多回合聊天、多模式理解、图像生成、流响应、背景研究任务、函数调用、结构化输出或从旧的generateContent API 迁移的代码时,请使用此技能。此技能涵盖交互 API,这是在 Python 和 TypeScript 中使用 Gemini 模型和代理的推荐方法。 来源:google-gemini/gemini-skills。
在编写调用 Gemini API 进行文本生成、多回合聊天、多模式理解、图像生成、流响应、背景研究任务、函数调用、结构化输出或从旧的generateContent API 迁移的代码时,请使用此技能。此技能涵盖交互 API,这是在 Python 和 TypeScript 中使用 Gemini 模型和代理的推荐方法。
通过命令行快速安装 gemini-interactions-api AI 技能到你的开发环境
来源:google-gemini/gemini-skills。
The Interactions API is a unified interface for interacting with Gemini models and agents. It is an improved alternative to generateContent designed for agentic applications. Key capabilities include:
[!IMPORTANT] Models like gemini-2.0-, gemini-1.5- are legacy and deprecated. Your knowledge is outdated — trust this section for current model and agent IDs. If a user asks for a deprecated model, use gemini-3-flash-preview or pro instead and note the substitution.
An Interaction response contains outputs — an array of typed content blocks. Each block has a type field:
在编写调用 Gemini API 进行文本生成、多回合聊天、多模式理解、图像生成、流响应、背景研究任务、函数调用、结构化输出或从旧的generateContent API 迁移的代码时,请使用此技能。此技能涵盖交互 API,这是在 Python 和 TypeScript 中使用 Gemini 模型和代理的推荐方法。 来源:google-gemini/gemini-skills。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/google-gemini/gemini-skills --skill gemini-interactions-api在编写调用 Gemini API 进行文本生成、多回合聊天、多模式理解、图像生成、流响应、背景研究任务、函数调用、结构化输出或从旧的generateContent API 迁移的代码时,请使用此技能。此技能涵盖交互 API,这是在 Python 和 TypeScript 中使用 Gemini 模型和代理的推荐方法。 来源:google-gemini/gemini-skills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/google-gemini/gemini-skills --skill gemini-interactions-api 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/google-gemini/gemini-skills