Docs : fix client to mcp_client in Gemini example

fixed `async with client:` to `async with mcp_client:`
This commit is contained in:
Yasiru 2025-06-06 21:43:24 +10:00 committed by GitHub
commit 7ffac70116
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ mcp_client = Client("server.py")
gemini_client = genai.Client()
async def main():
async with client:
async with mcp_client:
response = await gemini_client.aio.models.generate_content(
model="gemini-2.0-flash",
contents="Roll 3 dice!",