docs: PR 1 Audit and Fix Broken/Outdated Code Examples in Documentation#1910
docs: PR 1 Audit and Fix Broken/Outdated Code Examples in Documentation#1910pilartomas merged 8 commits intomainfrom
Conversation
…start docs Signed-off-by: Sandi Besen <[email protected]>
Summary of ChangesHello @sandijean90, 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 focuses on enhancing the clarity and correctness of the quickstart documentation by revising a command-line example. The update ensures that users are provided with an accurate and functional snippet, improving their initial experience with the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 updates the example command in the quickstart documentation, making it more descriptive. It also improves readability by aligning the comments in the code block. While this alignment is aesthetically pleasing, I've added a suggestion to consider using a single space for comments to improve long-term maintainability, though this is a stylistic choice.
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
| yield AgentArtifact( | ||
| parts=[ | ||
| TextPart(text="Here is the documentation you requested."), | ||
| FilePart(file=FileWithUri( | ||
| uri="https://example.com/report.pdf", | ||
| mime_type="application/pdf", | ||
| name="Report.pdf" | ||
| )) | ||
| ] | ||
| ) |
There was a problem hiding this comment.
@JanPokorny can you please ensure this is technically accurate and suggest changes if not
There was a problem hiding this comment.
@pilartomas Tagging you to review this code snippet so we can merge since Jan is out this week
| | Type | Best For... | Key Benefit | | ||
| | :--- | :--- | :--- | | ||
| | **Simple Data** (`str`, `dict`) | Simple text or JSON | Automatic conversion | | ||
| | **AgentMessage** | Standard conversational responses | Auto-generates IDs and handles `TextPart` wrapping | | ||
| | **AgentArtifact** | Returning files, documents, or assets | Automatically wraps content into A2A `Part` objects | | ||
| | **A2A Components** | Advanced protocol-level control | Full control over `Role`, `UUID`, and `Part` lists | | ||
| | **TaskStatus** | Tracking stateful progress | Allows you to signal specific states like `input_required` | |
There was a problem hiding this comment.
I think this is a good simplification. The reality is more complicated but that would be overwhelming imo. It should magically work for arbitrary yielded value anyway.
I'd maybe also add a note about resuming a yield with value (applies to input_required and auth_required statuses. E.g.
response = yield InputRequired(message=message)The full scope is
RunYield: TypeAlias = (
Message # includes AgentMessage (subclass)
| Part
| TaskStatus # includes InputRequired and AuthRequired (subclasses)
| Artifact
| TextPart
| FilePart
| FileWithBytes
| FileWithUri
| Metadata
| DataPart
| TaskStatusUpdateEvent
| TaskArtifactUpdateEvent
| str
| JsonDict
| Exception
)
RunYieldResume: TypeAlias = Message | None
pilartomas
left a comment
There was a problem hiding this comment.
The checks are failing because you've made changes into docs/stable subdir. Please move them to docs/development. They will be moved automatically to stable during release.
|
@pilartomas FYI these changes should be made to stable as well as dev as they need to be reflected immediately prior to the release of the Deep Learning course next week. |
Yep, we are planning releasing today. So lets just make sure this is merged. |
|
@tomkis are we going to release before that happens? ☝️ |
Summary
Quickstart code snippet audit and fix
Note: these changes will affect stable docs as they need to be reflected before the next release
Linked Issues
#1907
#1909
#1922
#1946
#1949
Documentation
This is documentation. This documentation will edit stable and development directly since they are urgent changes that can not wait until the next release.