Commit Graph

254 Commits

Author SHA1 Message Date
Twisha Bansal
0e152165ba chore: Update "llamaindex" to "LlamaIndex" for proper casing (#334) 2025-03-18 12:44:18 -06:00
Twisha Bansal
4ef82a3d6b chore: correct quickstart description to include LlamaIndex (#333) 2025-03-18 23:52:38 +05:30
Twisha Bansal
1757a63e2d docs: added quickstart guide for llamaindex sdk (#318)
Developed a quickstart using Llamaindex
[AgentWorkflow](https://docs.llamaindex.ai/en/stable/examples/agent/agent_workflow_basic/).

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
2025-03-18 23:32:36 +05:30
Twisha Bansal
c836e0f9d7 docs: add llamaindex sdk info to toolbox docs (#330) 2025-03-17 22:48:28 +05:30
Twisha Bansal
62fecac17e docs: use sync sdk interface for default example (#329) 2025-03-17 22:11:22 +05:30
Twisha Bansal
67524f347c docs: add llamaindex to readme (#328) 2025-03-17 21:59:16 +05:30
Anubhav Dhawan
bccb60b8d8 doc: Improve full doc link in README (#326)
This slightly improves readability as "full documentation" is
highlighted with the link, which is more accurate.
2025-03-17 12:20:25 +05:30
Yuan
2b6bb99daa chore: throw an error fail to retrieve user agent (#304)
User agent will be set as "genai-toolbox/" + versionString.

Instead of a panic, Toolbox will throw an error if the source fail to
retrieve `user agent`.

This will also be consistent with setting and getting logger from
context.
2025-03-11 13:46:44 -07:00
Yuan
ce12a344ed fix(source/alloydb): correct user agents not being sent (#323)
Bump alloydb go connector to v1.15.0 to adapt the fix for user agent
(https://github.com/googleapis/google-api-go-client/issues/3049).
2025-03-11 09:24:38 -07:00
Yuan
3f4563a17b docs: release please update versions on docs automatically (#321)
Include release please annotations to update version bumps in docs
automatically, refer
[here](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files)
for release please documentations.
2025-03-07 10:20:27 -08:00
Yuan
b20da75256 Revert "docs: release please update versions on docs automatically" (#320)
Reverts googleapis/genai-toolbox#319
2025-03-07 04:57:28 +00:00
Yuan
40ed3ed052 docs: release please update versions on docs automatically (#319)
Include release please annotations to update version bumps in docs
automatically, refer
[here](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files)
for release please documentations.
2025-03-06 20:52:48 -08:00
Jack Wotherspoon
06940f2d82 chore: update sdk reference in DEVELOPER.md (#317)
Was getting a 404 on link referencing SDK developer guide.

I think it is meant to point at
https://github.com/googleapis/genai-toolbox-langchain-python/blob/main/DEVELOPER.md
2025-03-05 16:45:46 -07:00
Yuan
e08c35faa2 docs: update toolbox version to the latest (#316) 2025-03-05 10:32:34 -08:00
Anubhav Dhawan
1bdd331ead chore: update "Hello, World!" message from the default route of Toolbox. (#315) 2025-03-04 22:59:06 +05:30
release-please[bot]
0872f1ceab chore(main): release 0.2.0 (#294)
🤖 I have created a release *beep* *boop*
---


##
[0.2.0](https://github.com/googleapis/genai-toolbox/compare/v0.1.0...v0.2.0)
(2025-03-03)


### ⚠ BREAKING CHANGES

* Rename "AuthSource" in favor of "AuthService"
([#297](https://github.com/googleapis/genai-toolbox/issues/297))

### Features

* Rename "AuthSource" in favor of "AuthService"
([#297](https://github.com/googleapis/genai-toolbox/issues/297))
([04cb5fb](04cb5fbc3e))

### Bug Fixes

* Add items to parameter manifest
([#293](https://github.com/googleapis/genai-toolbox/issues/293))
([541612d](541612d72d))
* **source/cloud-sql:** Correct user agents not being sent
([#306](https://github.com/googleapis/genai-toolbox/issues/306))
([584c8ae](584c8aea43))
* Throw error when items field is missing from array parameter
([#296](https://github.com/googleapis/genai-toolbox/issues/296))
([9193836](9193836eff))
* Validate required common fields for parameters
([#298](https://github.com/googleapis/genai-toolbox/issues/298))
([e494d11](e494d11e6e))


### Miscellaneous Chores

* Release 0.2.0
([#314](https://github.com/googleapis/genai-toolbox/issues/314))
([d7ccf73](d7ccf730e7))

---
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: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
v0.2.0
2025-03-03 11:01:38 -07:00
Yuan
d7ccf730e7 chore: release 0.2.0 (#314)
Release-As: 0.2.0
2025-03-03 17:17:32 +00:00
Yuan
e73fbfeb3d chore(telemetry): update root trace to use context from root (#311)
Update root trace to use context from `cmd/root` instead of creating a
new context.
2025-03-03 17:05:34 +00:00
sujithrpillai
1cba4823e7 docs: add deployment how-to for Docker Compose (#309)
Fixes #288

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
2025-02-28 09:45:54 -07:00
Yuan
584c8aea43 fix(source/cloud-sql): correct user agents not being sent (#306)
Bump cloud sql go connector to v1.15.0 to adapt the fix for user agent
(https://github.com/GoogleCloudPlatform/cloud-sql-go-connector/pull/928).
2025-02-25 15:35:24 -08:00
Yuan
f1156ffc18 docs(tool/spanner-sql): fix spanner-sql kind in example (#303)
Update `spanner-sql` kind in example. It was previously updated
throughout the doc, except for the example.
It should be `spanner-sql` instead of `spanner`.

Fixes #302
2025-02-24 10:10:23 -08:00
Yuan
d6fa1f2f3a docs(deploy/GKE): add guide to deploy toolbox to GKE (#190)
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Anubhav Dhawan <anubhav756@gmail.com>
2025-02-21 21:17:14 -08:00
Yuan
04cb5fbc3e feat!: deprecate authsource in favor of authservice (#297)
Rename existing `authSource` to `authService` through deprecation.
`AuthService` more clearly distinguishes it from `Sources` objects.

`authSources` will be converted into `authServices` after the
unmarshalling process. A warning log is shown if `authSources` are used
(for both within tools parameters and defining auth services):
```
2025-02-20T13:57:51.156025-08:00 WARN "`authSources` is deprecated, use `authServices` for parameters instead"
2025-02-20T13:57:51.156569-08:00 WARN "`authSources` is deprecated, use `authServices` instead"
2025-02-20T13:57:52.047584-08:00 INFO "Initialized 1 sources."
...
```

The manifest generated will continue to use `authSources` to keep
compatibility with the sdks:
```
{
"serverVersion":"0.1.0",
"tools":{
  "test_tool2":{
    "description":"Use this tool to test\n",
    "parameters":[{
      "name":"user_id",
      "type":"string",
      "description":"Auto-populated from Google login",
      "authSources":["my-google-auth"]
      }]
    }
  }
}
```



Test cases with `authSources` are kept for compatibility. Will be
removed when `authSources` are no longer supported.
2025-02-21 18:36:04 -08:00
Yuan
df28036b84 chore: add and retrieves logger from context (#301)
Add functionality to add and retrieve logger from Go context.
2025-02-21 21:28:40 +00:00
Yuan
95d29f9e8a chore: pass logger via context through unmarshaller (#300)
Passing logger via context. With this, we will be able to add logs
during the unmarshaling process.
2025-02-21 13:02:23 -08:00
Yuan
9e2f49e129 chore: migrate remaining yaml library to goccy/go-yaml (#299)
Migrate yaml library from
[gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) to
[goccy/go-yaml](https://github.com/goccy/go-yaml).

It was previously migrated in
https://github.com/googleapis/genai-toolbox/pull/211. These files were
added later hence the migration wasn't done on these files.
2025-02-21 12:54:42 -08:00
Yuan
e494d11e6e fix: validate required common fields for parameters (#298)
Check common parameters for required fields. Throw an error if name or
description is not provided.

Example of error when `description` field not provided:
```
2025-02-18T14:11:55.475101-08:00 ERROR "unable to parse tool file at \"tools.yaml\": unable to parse as \"postgres-sql\": unable to parse as \"array\": Key: 'CommonParameter.Desc' Error:Field validation for 'Desc' failed on the 'required' tag"
```
2025-02-19 10:09:57 -08:00
Yuan
9193836eff fix: throw error when items field is missing from array parameter (#296)
Fixes #291 by throwing a more descriptive error when items field is not provided.

Example of error when `items` field not provided for array parameter:
```
2025-02-18T14:07:58.77173-08:00 ERROR "unable to parse tool file at \"tools.yaml\": unable to parse as \"postgres-sql\": unable to parse as \"array\": unable to parse 'items' field: error parsing parameters: nothing to unmarshal"
```
2025-02-18 19:52:36 -07:00
Yuan
541612d72d fix: add items to parameter manifest (#293)
`items` are not specified in the manifest for parameters, which means
the client doesn't parse them correctly when presented to the LLMs. This
PR adds `items` as part of manifest.

Example manifest:
```
{
    "serverVersion": "0.1.0",
    "tools": {
        "tool_name": {
            "description": "description of the tool...",
            "parameters": [{
                "name": "foos",
                "type": "array",
                "description": "A list of foo.",
                "authSources": [],
                "items": {"name": "foo", "type": "string", "description": "foobar.", "authSources": []}
            }]
        }
    }
}
```

Fixes #292 🦕
2025-02-14 15:29:16 -08:00
Kurtis Van Gent
914f8437b1 chore: improve wording about virtual environments in quickstart (#290) 2025-02-12 17:19:24 -07:00
Kurtis Van Gent
d9c050ce13 docs: clarify pip as a requirement (#289)
Updates the local_quickstart to clarify pip as a requirement and connect
using psql consistently.
2025-02-12 17:11:54 -07:00
Yuan
a01247d860 ci: reorganize integration test files (#285)
Reorganize integration tests, mainly between postgres, mysql, and sql
server that shares alot similar code.
* separate commons_test.go to multiple file:
    * server_test.go: for setting up server etc.
* tool_test.go: for testing tools endpoint, including testing tools with
parameters or auth-invokes
* source_test.go: for testing source such as connection tests or setting
up source-related code
    * auth_test.go: only contain auth set up related code
* common_test.go: consist of common and general set up such as getting
tools config etc.
* Move `switch-case` into individual source's test file so common files
only contains code that don't need to be altered when adding new
integration test. This will ease future debugging and adding new tests.

The following integration tests are not updated (does not have testing
of tool invoke with parameters):
- dgraph 
- neo4j
- spanner (will require more changes, will update in a separate PR)

This PR also does not re-organize `tests/` folder structure.
2025-02-10 18:11:58 -08:00
Anubhav Dhawan
941745b3a3 doc: Update README to improve Toolbox LangChain SDK installation instructions (#287)
Add the bash command to `pip install` the package directly in the README
for a quicker start.

Also add “SDK” after “Toolbox LangChain” to clearly show that “Toolbox
LangChain” is an SDK.

> [!NOTE]
> We had released the PyPI package for Toolbox LangChain SDK as
`toolbox-langchain` and not `toolbox-langchain-sdk` but it still makes
sense to call it “Toolbox LangChain SDK” in natural language.
2025-02-10 08:34:27 -07:00
fengjessica
0bb5010a52 chore: update description for draph (#281)
Updated Dgraph description

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
2025-02-06 15:54:04 -08:00
Yuan
4b7bb158b4 docs(tools): fix broken links (#284)
Fix broken links to auth source page.

Fixes #282
2025-02-06 15:38:52 -08:00
Kurtis Van Gent
70f617bbae chore: fix graphic with correct name (#283) 2025-02-06 16:22:01 -07:00
Kurtis Van Gent
399cd8686f chore: correct formatting on intro (#279) 2025-02-06 09:45:31 -08:00
Kurtis Van Gent
9ab4dcceac chore(docs): correct reference to auth params (#278) 2025-02-06 10:32:42 -07:00
Anubhav Dhawan
4e37e5818a doc: Update README for a typo in sources link (#277) 2025-02-06 07:01:40 -07:00
Twisha Bansal
8c9305c4c8 chore(docs): fix quickstart (#276) 2025-02-06 04:40:48 -07:00
Kurtis Van Gent
cd4b35e108 chore: make docs public (#274) 2025-02-05 21:32:39 -07:00
Kurtis Van Gent
59b4282adb chore: update README and move to docs site (#273)
Updates the README and pushes doc site changes.
2025-02-06 04:01:54 +00:00
release-please[bot]
53158b07f2 chore(main): release 0.1.0 (#217)
🤖 I have created a release *beep* *boop*
---


##
[0.1.0](https://github.com/googleapis/genai-toolbox/compare/v0.0.5...v0.1.0)
(2025-02-06)


### ⚠ BREAKING CHANGES

* **langchain-sdk:** The SDK for `toolbox-langchain` is now located
[here](https://github.com/googleapis/genai-toolbox-langchain-python).

### Features

* Add Cloud SQL for SQL Server Source and Tool
([#223](https://github.com/googleapis/genai-toolbox/issues/223))
([9bad952](9bad952060))
* Add Cloud SQL for MySQL Source and Tool
([#221](https://github.com/googleapis/genai-toolbox/issues/221))
([f1f61d7](f1f61d7087))
* Add Dgraph Source and Tool
([#233](https://github.com/googleapis/genai-toolbox/issues/233))
([617cc87](617cc872d1))
* Add local quickstart
([#232](https://github.com/googleapis/genai-toolbox/issues/232))
([497fb06](497fb06fae))
* Add user agents for cloud sources
([#244](https://github.com/googleapis/genai-toolbox/issues/244))
([8452f8e](8452f8eb44))
* Add MySQL Source
([#250](https://github.com/googleapis/genai-toolbox/issues/250))
([378692a](378692ab50))
* Add MSSQL source
([#255](https://github.com/googleapis/genai-toolbox/issues/255))
([8fca0a9](8fca0a95ee))


### Bug Fixes

* Auth token verification failure should not throw error immediately
([#234](https://github.com/googleapis/genai-toolbox/issues/234))
([4639cc6](4639cc6560))
* Fix typo in postgres test
([#216](https://github.com/googleapis/genai-toolbox/issues/216))
([0c3d12a](0c3d12ae04))
* **mssql:** Fix mssql tool kind to mssql-sql
([#249](https://github.com/googleapis/genai-toolbox/issues/249))
([1357be2](1357be2569))
* **mysql:** Fix mysql tool kind to mysql-sql
([#248](https://github.com/googleapis/genai-toolbox/issues/248))
([669d6b7](669d6b7239))
* Schema float type
([#264](https://github.com/googleapis/genai-toolbox/issues/264))
([1702f74](1702f74e99))
* Typos at test cases
([#265](https://github.com/googleapis/genai-toolbox/issues/265))
([b7c5661](b7c5661215))
* Update README and quickstart with the correct async APIs.
([#269](https://github.com/googleapis/genai-toolbox/issues/269))
([21eef2e](21eef2e198))
* Update tool invoke to return json
([#266](https://github.com/googleapis/genai-toolbox/issues/266))
([ad58cd5](ad58cd5855))

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
v0.1.0
2025-02-05 18:46:38 -08:00
Yuan
c6e3f731e2 chore(main): release 0.1.0 (#272)
Release-As: 0.1.0
2025-02-05 17:07:38 -08:00
Yuan
5fedbde87c chore: remove sdks and doc fixes (#271)
Remove `/sdks` folder and fix README file.
Update quickstart to remove installing python package from git repo.
2025-02-06 00:24:52 +00:00
Yuan
2d80922900 doc: fix typo for quickstart (#270) 2025-02-05 23:58:53 +00:00
Anubhav Dhawan
21eef2e198 fix: Update README and quickstart with the correct async APIs. (#269) 2025-02-05 22:39:24 +00:00
Kurtis Van Gent
2a78de8f46 chore: add FAQ (#268)
Adds a simple FAQ.

---------

Co-authored-by: Averi Kitsch <akitsch@google.com>
2025-02-05 22:31:51 +00:00
Anubhav Dhawan
1e0dd04f32 doc: update READMEs for sync/async (#237)
Follows
https://github.com/googleapis/genai-toolbox-langchain-python/pull/15
2025-02-05 15:19:25 -07:00
Yuan
ad58cd5855 fix: update tool invoke to return json (#266)
Return actual rows as `[]any` that contains `map` of results. Each `map`
represent a row, with the key being column name.
2025-02-05 13:45:01 -08:00