chore(python): Updated Python documentation for 0.50 alpha#217
chore(python): Updated Python documentation for 0.50 alpha#217huangjeff5 wants to merge 7 commits intomainfrom
Conversation
Summary of ChangesHello @huangjeff5, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a substantial overhaul and expansion of the Python documentation for the Genkit 0.50 alpha release. The primary goal is to provide Python developers with comprehensive and current guides for integrating Genkit into their AI applications. This includes a strategic shift towards FastAPI for web framework integration, detailed instructions for various model and utility plugins, and in-depth explanations of core Genkit functionalities like prompt management, evaluation, and deployment. The updates aim to streamline the developer experience and ensure feature parity in documentation across supported languages. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request significantly expands and updates the Python documentation across various Genkit features and integrations. Key changes include adding Python support to the LanguageSelector component in several documentation files (chat.mdx, dotprompt.mdx, evaluation.mdx, anthropic.mdx, deepseek.mdx, google-cloud.mdx, openai-compatible.mdx, xai.mdx, model-context-protocol.mdx, observability/advanced-configuration.mdx, observability/authentication.mdx, observability/getting-started.mdx, observability/telemetry-collection.mdx, observability/troubleshooting.mdx).
The Python deployment guides have been overhauled, replacing Flask-based examples with comprehensive FastAPI instructions for both general deployment (any-platform.mdx) and Cloud Run (cloud-run.mdx), including detailed setup with uv, Dockerfiles, and production best practices. The get-started.mdx guide now mandates uv for Python project setup and package management.
Python-specific content has been added or updated for advanced features such as Dotprompt (dotprompt.mdx), Evaluation (evaluation.mdx), Model Context Protocol (model-context-protocol.mdx), and Tool Calling (tool-calling.mdx), including examples for streaming, structured output, and handling interrupts. The flows.mdx file updates Python examples to use Output(schema=...) for structured output and introduces a 'Flow steps' section with ai.run() examples.
Plugin integration documentation for Python has been extensively updated or newly added for Anthropic, DeepSeek, Google Cloud, Google GenAI, Ollama, OpenAI, OpenAI-Compatible, xAI, Firebase Firestore, Vertex AI Vector Search with BigQuery, and Vertex AI Vector Search with Firestore. These updates include installation instructions using uv add (where applicable), configuration details, available models, and usage examples covering text generation, embeddings, structured output, tool calling, streaming, and multimodal capabilities. The rag.mdx file now includes Python examples for defining and using indexers.
Review comments highlight several issues: a missing slowapi dependency in the uv add command for rate limiting in cloud-run.mdx, an incorrect reference to genkit-tools.conf.js in the Python evaluation documentation, and consistent misuse of add_gcp_telemetry instead of add_firebase_telemetry in Python observability examples. Additionally, there are multiple instances of googleai/gemini-2.0-flash being used instead of the more current googleai/gemini-2.5-flash model name, and some pip install commands need to be updated to uv add for consistency.
No description provided.