Fix for #517
This PR improves the Local Quickstart guide by adding troubleshooting
advice for common PostgreSQL connection issues in [step
1](https://googleapis.github.io/genai-toolbox/getting-started/local_quickstart/#step-1-set-up-your-database).
This reduces friction and improves the setup experience for users
following the local quickstart by addressing feedback in #517 regarding
difficulties in the initial database connection step.
### Problem
Users faced issues like password prompts or "role 'postgres' does not
exist" errors when trying to connect to PostgreSQL with `psql -h
127.0.0.1 -U postgres`.
### Solution
This PR adds a notice that provides solutions for common connection
errors, including guidance on using `sudo -i -u postgres` for peer
authentication.
---------
Co-authored-by: Averi Kitsch <akitsch@google.com>
The wording for `Authorized Invocations` reads a bit funny and has a
typo.
Updating it to make a bit more sense and fixing a couple other typos
around auth.
Updating docs to use the `--tools-file` flag over the now deprecated
`--tools_file`.
The new flag was added as of `v0.3.0` in #384
This change reduces confusion as current usage in docs results in
following message on startup of Toolbox server:
```sh
Flag --tools_file has been deprecated, please use --tools-file instead
```
Fixes#514
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
This tool can be used across all postgres sources.
`postgres-execute-sql` config is as below:
```
tools:
postgres_execute_sql_tool:
kind: "postgres-execute-sql"
source: my-alloydb-source // or any other sources that is compatible with this tool
description: Use this tool to execute sql.
```
The `postgres-execute-sql` tool takes one parameter. Example request as
follow:
```
curl -X POST -H "Content-Type: application/json" -d '{"sql": "SELECT 1"}' http://127.0.0.1:5000/api/tool/postgres_execute_sql_tool/invoke
```
Environment variable replacement is needed so that users don't have to
hardcode their secrets in configuring `tools.yaml`.
Both formats `$ENV_NAME` and `${ENV_NAME}` are standard ways to declare
an environment variable.
However, some database statement placeholders that are already using the
`$ENV_NAME` format.
Therefore, we only support env var declaration using `${ENV_NAME}` to
disambiguate it from other usages.
Fixes issue: https://github.com/googleapis/genai-toolbox/issues/431
A `BigQuery` source can be added as the following example:
```yaml
sources:
my-bigquery-source:
kind: bigquery
project: bigframes-dev
location: us # This field is optional
```
A `BigQuery` tool can be added as below:
```yaml
tools:
search-hotels-by-name:
kind: bigquery-sql
source: my-bigquery-source
description: Search for hotels based on name.
parameters:
- name: name
type: string
description: The name of the hotel.
```
---------
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
When previewing the site, warnings are printed out:
```
WARN Shortcode "tabpane": duplicate tab-persistence key "yaml" detected, disabling persistence to avoid multiple tab display.
```
This PR fixes these issues.
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
# Add Bigtable support
A `bigtable` source can be added as the following example
```
sources:
test-bigtable-source:
kind: "bigtable"
project: "sample-project"
instance: "sample-instance"
```
A `bigtable` tool can be added as below
```
tools:
get-test-tool-data:
kind: bigtable-sql
source: test-bigtable-source
description: Some description
statement: SELECT * FROM `test-table` WHERE address['state'] = @state;
parameters:
- name: state
type: string
description: Filter by state
```
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
Add instructions on using toolset in docs.
Also added toolset to the quickstart example to reflect that we support
toolset within mcp and be consistent with the local quickstart.