d08200d00e
* Bump Python package versions for 1.12.0 release Bump packages represented in the 1.12.0 changelog, promote Foundry Hosting, Azure Content Understanding, Gemini, Mistral, Monty, and Tools to beta, and apply the requested beta cohort date stamp. Root and core move to 1.12.0, released and RC packages use their selected increments, alpha packages including Hosting MCP use the 260721 stamp, and core floors are raised only for proven consumers. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf * fix version in readme * Add Responses conversation ID changes to release notes Include the breaking Hosting Responses conversation ID helper changes from #7234 in the Python 1.12.0 changelog. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
1.6 KiB
1.6 KiB
Gemini Package (agent-framework-gemini)
Integration with Google's Gemini Developer API and Vertex AI via the google-genai SDK.
Core Classes
RawGeminiChatClient- Lightweight chat client without any layers, for custom pipeline compositionGeminiChatClient- Full-featured chat client with function invocation, middleware, and telemetryGeminiChatOptions- Options TypedDict for Gemini-specific parametersGeminiSettings- Settings loaded from environment variablesGoogleGeminiSettings- SDK-standardGOOGLE_*settings loaded from environment variablesThinkingConfig- Configuration for extended thinking
Gemini-specific Options
thinking_config- Enable extended thinking viaThinkingConfigresponse_schema- Raw JSON schema dict for structured output (alternative toresponse_format)top_k- Top-K sampling parameter
Built-in Tool Factory Methods
get_web_search_tool()- Google Search grounding for up-to-date web answersget_code_interpreter_tool()- Sandboxed code executionget_maps_grounding_tool()- Google Maps grounding for location and mappingget_file_search_tool()- Retrieval from Gemini file search storesget_mcp_tool()- Model Context Protocol server integration
Usage
from agent_framework import Content, Message
from agent_framework.gemini import GeminiChatClient
client = GeminiChatClient(model="gemini-2.5-flash")
response = await client.get_response([Message(role="user", contents=[Content.from_text("Hello")])])