mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-04-09 03:02:26 -04:00
🤖 I have created a release *beep* *boop* --- ## [0.23.0](https://github.com/googleapis/genai-toolbox/compare/v0.22.0...v0.23.0) (2025-12-11) ### ⚠ BREAKING CHANGES * **serverless-spark:** add URLs to create batch tool outputs * **serverless-spark:** add URLs to list_batches output * **serverless-spark:** add Cloud Console and Logging URLs to get_batch * **tools/postgres:** Add additional filter params for existing postgres tools ([#2033](https://github.com/googleapis/genai-toolbox/issues/2033)) ### Features * **tools/postgres:** Add list-table-stats-tool to list table statistics. ([#2055](https://github.com/googleapis/genai-toolbox/issues/2055)) ([78b02f0](78b02f08c3)) * **looker/tools:** Enhance dashboard creation with dashboard filters ([#2133](https://github.com/googleapis/genai-toolbox/issues/2133)) ([285aa46](285aa46b88)) * **serverless-spark:** Add Cloud Console and Logging URLs to get_batch ([e29c061](e29c0616d6)) * **serverless-spark:** Add URLs to create batch tool outputs ([c6ccf4b](c6ccf4bd87)) * **serverless-spark:** Add URLs to list_batches output ([5605eab](5605eabd69)) * **sources/mariadb:** Add MariaDB source and MySQL tools integration ([#1908](https://github.com/googleapis/genai-toolbox/issues/1908)) ([3b40fea](3b40fea25e)) * **tools/postgres:** Add additional filter params for existing postgres tools ([#2033](https://github.com/googleapis/genai-toolbox/issues/2033)) ([489117d](489117d747)) * **tools/postgres:** Add list_pg_settings, list_database_stats tools for postgres ([#2030](https://github.com/googleapis/genai-toolbox/issues/2030)) ([32367a4](32367a472f)) * **tools/postgres:** Add new postgres-list-roles tool ([#2038](https://github.com/googleapis/genai-toolbox/issues/2038)) ([bea9705](bea9705450)) ### Bug Fixes * List tables tools null fix ([#2107](https://github.com/googleapis/genai-toolbox/issues/2107)) ([2b45266](2b45266598)) * **tools/mongodb:** Removed sortPayload and sortParams ([#1238](https://github.com/googleapis/genai-toolbox/issues/1238)) ([c5a6daa](c5a6daa768)) ### Miscellaneous Chores * **looker:** Upgrade to latest go sdk ([#2159](https://github.com/googleapis/genai-toolbox/issues/2159)) ([78e015d](78e015d7df)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
122 lines
4.0 KiB
Markdown
122 lines
4.0 KiB
Markdown
<!-- This file has been used in local_quickstart.md, local_quickstart_go.md & local_quickstart_js.md -->
|
|
<!-- [START configure_toolbox] -->
|
|
In this section, we will download Toolbox, configure our tools in a
|
|
`tools.yaml`, and then run the Toolbox server.
|
|
|
|
1. Download the latest version of Toolbox as a binary:
|
|
|
|
{{< notice tip >}}
|
|
Select the
|
|
[correct binary](https://github.com/googleapis/genai-toolbox/releases)
|
|
corresponding to your OS and CPU architecture.
|
|
{{< /notice >}}
|
|
<!-- {x-release-please-start-version} -->
|
|
```bash
|
|
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
|
|
curl -O https://storage.googleapis.com/genai-toolbox/v0.23.0/$OS/toolbox
|
|
```
|
|
<!-- {x-release-please-end} -->
|
|
|
|
1. Make the binary executable:
|
|
|
|
```bash
|
|
chmod +x toolbox
|
|
```
|
|
|
|
1. Write the following into a `tools.yaml` file. Be sure to update any fields
|
|
such as `user`, `password`, or `database` that you may have customized in the
|
|
previous step.
|
|
|
|
{{< notice tip >}}
|
|
In practice, use environment variable replacement with the format ${ENV_NAME}
|
|
instead of hardcoding your secrets into the configuration file.
|
|
{{< /notice >}}
|
|
|
|
```yaml
|
|
sources:
|
|
my-pg-source:
|
|
kind: postgres
|
|
host: 127.0.0.1
|
|
port: 5432
|
|
database: toolbox_db
|
|
user: ${USER_NAME}
|
|
password: ${PASSWORD}
|
|
tools:
|
|
search-hotels-by-name:
|
|
kind: postgres-sql
|
|
source: my-pg-source
|
|
description: Search for hotels based on name.
|
|
parameters:
|
|
- name: name
|
|
type: string
|
|
description: The name of the hotel.
|
|
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';
|
|
search-hotels-by-location:
|
|
kind: postgres-sql
|
|
source: my-pg-source
|
|
description: Search for hotels based on location.
|
|
parameters:
|
|
- name: location
|
|
type: string
|
|
description: The location of the hotel.
|
|
statement: SELECT * FROM hotels WHERE location ILIKE '%' || $1 || '%';
|
|
book-hotel:
|
|
kind: postgres-sql
|
|
source: my-pg-source
|
|
description: >-
|
|
Book a hotel by its ID. If the hotel is successfully booked, returns a NULL, raises an error if not.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to book.
|
|
statement: UPDATE hotels SET booked = B'1' WHERE id = $1;
|
|
update-hotel:
|
|
kind: postgres-sql
|
|
source: my-pg-source
|
|
description: >-
|
|
Update a hotel's check-in and check-out dates by its ID. Returns a message
|
|
indicating whether the hotel was successfully updated or not.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to update.
|
|
- name: checkin_date
|
|
type: string
|
|
description: The new check-in date of the hotel.
|
|
- name: checkout_date
|
|
type: string
|
|
description: The new check-out date of the hotel.
|
|
statement: >-
|
|
UPDATE hotels SET checkin_date = CAST($2 as date), checkout_date = CAST($3
|
|
as date) WHERE id = $1;
|
|
cancel-hotel:
|
|
kind: postgres-sql
|
|
source: my-pg-source
|
|
description: Cancel a hotel by its ID.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to cancel.
|
|
statement: UPDATE hotels SET booked = B'0' WHERE id = $1;
|
|
toolsets:
|
|
my-toolset:
|
|
- search-hotels-by-name
|
|
- search-hotels-by-location
|
|
- book-hotel
|
|
- update-hotel
|
|
- cancel-hotel
|
|
```
|
|
|
|
For more info on tools, check out the `Resources` section of the docs.
|
|
|
|
1. Run the Toolbox server, pointing to the `tools.yaml` file created earlier:
|
|
|
|
```bash
|
|
./toolbox --tools-file "tools.yaml"
|
|
```
|
|
|
|
{{< notice note >}}
|
|
Toolbox enables dynamic reloading by default. To disable, use the
|
|
`--disable-reload` flag.
|
|
{{< /notice >}}
|
|
<!-- [END configure_toolbox] --> |