-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: JS toolbox-adk sdk doc migration #2395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: js-sdk-docs
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @rapid-killer-9, 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 migrates and introduces new, detailed documentation for the Highlights
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a new markdown document for the Toolbox-adk SDK, providing documentation and usage examples. The review focuses on ensuring the documentation is clear, correct, and follows best practices for SDK usage. No specific style guide was provided, so the review defaults to general documentation best practices.
| import { ToolboxClient } from '@toolbox-sdk/adk'; | ||
| const client = new ToolboxClient(URL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL variable is used without being defined within the scope of this code snippet. This could lead to confusion for users trying to run this example. It should be defined or replaced with a placeholder URL.
Consider defining the URL variable before its usage or replacing it with a placeholder URL to make the example self-contained and runnable.
| import { ToolboxClient } from '@toolbox-sdk/adk'; | |
| const client = new ToolboxClient(URL); | |
| import { ToolboxClient } from '@toolbox-sdk/adk'; | |
| const URL = 'http://127.0.0.1:5000'; // Replace with your Toolbox service URL | |
| const client = new ToolboxClient(URL); |
| const tool = await toolbox.loadTool("my-tool") | ||
| const result = await tool.runAsync(args: {a: 5, b: 2}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples use toolbox without it being defined. It should be client to align with the client initialization examples above.
Consider updating toolbox to client to ensure consistency with the client initialization examples.
| const tool = await toolbox.loadTool("my-tool") | |
| const result = await tool.runAsync(args: {a: 5, b: 2}) | |
| const tool = await client.loadTool("my-tool") | |
| const result = await tool.runAsync(args: {a: 5, b: 2}) |
| const authTool = await toolbox.loadTool("toolName", {"myAuth": getAuthToken}) | ||
|
|
||
| // OR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL variable is used without being defined within the scope of this code snippet. This could lead to confusion for users trying to run this example. It should be defined or replaced with a placeholder URL.
Consider defining the URL variable before its usage or replacing it with a placeholder URL to make the example self-contained and runnable.
| const authTool = await toolbox.loadTool("toolName", {"myAuth": getAuthToken}) | |
| // OR | |
| import { ToolboxClient } from '@toolbox-sdk/core'; | |
| // update the url to point to your server | |
| const URL = 'http://127.0.0.1:5000'; |
| import {ToolboxClient} from '@toolbox-sdk/core' | ||
|
|
||
| const toolboxClient = new ToolboxClient("http://127.0.0.1:5000"); | ||
| const loadedTools = await toolboxClient.loadToolset(); | ||
|
|
||
| export const rootAgent = new LlmAgent({ | ||
| name: 'weather_time_agent', | ||
| model: 'gemini-2.5-flash', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment // Use the client and tools as per requirement is vague and doesn't provide specific guidance to the user. Consider expanding on this comment to provide more context or examples of how to use the client and tools.
Consider expanding on the comment to provide more context or examples of how to use the client and tools.
| import {ToolboxClient} from '@toolbox-sdk/core' | |
| const toolboxClient = new ToolboxClient("http://127.0.0.1:5000"); | |
| const loadedTools = await toolboxClient.loadToolset(); | |
| export const rootAgent = new LlmAgent({ | |
| name: 'weather_time_agent', | |
| model: 'gemini-2.5-flash', | |
| // Use the client and tools to interact with the Toolbox service | |
| // For example, load a toolset and run a tool: | |
| // const tools = await client.loadToolset(); | |
| // const result = await tools[0].runAsync({ input: 'example' }); |
Updated title and description for the adk documentation.
Migrating docs from Js Sdk to the main docsite for toolbox-adk