Commit Graph

80 Commits

Author SHA1 Message Date
Yuan
7878858bea chore: move logger interface to log/ (#101) 2024-12-02 11:44:46 -08:00
Anubhav Dhawan
4b47725411 doc: Improve the developer.md file to segregate install and test steps. (#99) 2024-12-02 17:08:17 +00:00
Twisha Bansal
a12973ea36 chore(langchain-sdk): pin versions in requirements.txt (#94) 2024-11-27 12:08:33 -07:00
Twisha Bansal
084725ee05 ci(llamaindex): Added auto lint and integration test config (#72)
This PR adds CI workflows for linting and integration tests to the
Llamaindex SDK.

Linting is failing due to type checking errors in the SDK (to be fixed
separately).
Integration tests are failing since there are no existing tests.
2024-11-27 17:29:24 +00:00
Twisha Bansal
20c90ec317 chore(llamaindex-sdk): pin versions in requirements.txt (#93) 2024-11-27 22:53:15 +05:30
Twisha Bansal
9bce24dc0e chore(langchain-sdk): add note to README about asyncio environments (#92) 2024-11-27 10:11:57 -07:00
Twisha Bansal
c65edf8c27 chore(llamaindex-sdk): add note to README about asyncio environments (#91) 2024-11-27 09:47:24 +05:30
Yuan
ea04688331 ci: setup continuous release (#86)
Setup continuous release for Toolbox.
Cloudbuild triggers releases when there's a push to the main branch.

Binary url:
`https://storage.googleapis.com/genai-toolbox-dev/$REF_NAME/darwin/amd64/toolbox`
image url:
`us-central1-docker.pkg.dev/database-toolbox/toolbox-dev/toolbox:$REF_NAME`
2024-11-26 17:14:51 -08:00
Kurtis Van Gent
7650a0b6d6 ci: improve releasing (#66)
Does a few things to improve releasing process:
- Moves file to .ci folder
- Updates release script to check for version
- Uses printf instead of "echo" to work better between linux/mac
- removes comments about non-mac (worked on linux for me)

I've also updated the tigger to run on new tags.

---------

Co-authored-by: Yuan Teoh <yuanteoh@google.com>
2024-11-26 15:48:58 -07:00
Yuan
5e20417551 feat: add structured logger (#96)
Logging support 4 different types of logging (debug, info, warn, error).

Example of structured logger:

```
{
  "timestamp":"2024-11-04T16:45:11.987299-08:00",
  "severity":"ERROR",
  "logging.googleapis.com/sourceLocation":{
    "function":"github.com/googleapis/genai-toolbox/internal/log.(*StructuredLogger).Errorf",
    "file":"/Users/yuanteoh/github/genai-toolbox/internal/log/log.go","line":157
  },
  "message":"unable to parse tool file at \"tools.yaml\": \"cloud-sql-postgres1\" is not a valid kind of data source"
}
```

```
{
  "timestamp":"2024-11-04T16:45:11.987562-08:00",
  "severity":"INFO",
  "logging.googleapis.com/sourceLocation":{
    "function":"github.com/googleapis/genai-toolbox/internal/log.(*StructuredLogger).Infof",
    "file":"/Users/yuanteoh/github/genai-toolbox/internal/log/log.go","line":147
  },
  "message":"Initalized 0 sources.\n"
}
```
2024-11-26 13:57:44 -08:00
Yuan
6a8feb51f0 feat: add std logger (#95)
Logging support 4 different types of logging (debug, info, warn, error).

Example of standard logger:
`2024-11-12T15:08:11.451147-08:00 ERROR "unable to parse tool file at
\"tools.yaml\": \"cloud-sql-postgres1\" is not a valid kind of data
source"`

`2024-11-12T15:08:11.451377-08:00 INFO "Initalized 0 sources.\n"`
2024-11-26 12:51:19 -08:00
Kurtis Van Gent
d29a32936e docs: add intros to Cloud SQL and AlloyDB (#89)
Address a comment about getting started from Per.
2024-11-22 13:43:55 -07:00
Kurtis Van Gent
2203a374a2 docs: misc improvements to README (#88)
Fix numerous issues flagged by @vmanghnani.
2024-11-22 13:16:51 -07:00
Twisha Bansal
9a4d13d7da chore(llamaindex-sdk): Fix path (#85) 2024-11-21 15:45:13 -07:00
Wenxin Du
8c2c373d35 fix: fix go test workflow (#84) 2024-11-19 17:25:59 -05:00
Anubhav Dhawan
fa03376bbc fix(llamaindex-sdk): Fix issue causing client session to not close properly while closing SDK. (#82) 2024-11-19 13:58:36 +05:30
Anubhav Dhawan
9d360e16ea fix: Fix issue causing client session to not close properly while closing SDK. (#81) 2024-11-19 13:29:09 +05:30
Anubhav Dhawan
9ed4479428 chore(langchain-sdk): Pin LangChain SDK deps versions. (#77) 2024-11-19 06:14:14 +00:00
Twisha Bansal
2986916740 chore(llamaindex-sdk): Pin llamaindex SDK deps versions (#76) 2024-11-18 10:23:04 +05:30
Anubhav Dhawan
522bbefa7b fix: Fix the errors showing up after setting up mypy type checker. (#74) 2024-11-14 14:04:24 -08:00
Wenxin Du
751228a774 ci: add e2e testing with cloud build (#27) 2024-11-13 17:59:41 -05:00
Twisha Bansal
75ce468b2f chore(langchain-sdk): Fix type checks (#70) 2024-11-13 15:57:52 +00:00
Twisha Bansal
83b87f4666 chore(llamaindex-sdk): Fix type checks (#69) 2024-11-13 08:55:09 -07:00
Twisha Bansal
74c032abdf docs: fix link to sdk developer file (#67) 2024-11-13 11:59:02 +05:30
release-please[bot]
8a6ec6042c chore(main): release 0.0.2 (#35)
🤖 I have created a release *beep* *boop*
---


##
[0.0.2](https://github.com/googleapis/genai-toolbox/compare/v0.0.1...v0.0.2)
(2024-11-12)


### ⚠ BREAKING CHANGES

* consolidate "x-postgres-generic" tools to "postgres-sql" tool
([#43](https://github.com/googleapis/genai-toolbox/issues/43))

### Features

* Consolidate "x-postgres-generic" tools to "postgres-sql" tool
([#43](https://github.com/googleapis/genai-toolbox/issues/43))
([f630965](f630965937))
* **container:** Add entrypoint in Dockerfile
([#38](https://github.com/googleapis/genai-toolbox/issues/38))
([b08072a](b08072a800))
* LlamaIndex SDK
([#48](https://github.com/googleapis/genai-toolbox/issues/48))
([b824abe](b824abe72f))
* **sdk:** Make ClientSession optional when initializing ToolboxClient
([#55](https://github.com/googleapis/genai-toolbox/issues/55))
([26347b5](26347b5a5e))
* Support requesting a single tool
([#56](https://github.com/googleapis/genai-toolbox/issues/56))
([efafba9](efafba9033))


### Bug Fixes

* Correct source type validation for postgres-sql tool
([#47](https://github.com/googleapis/genai-toolbox/issues/47))
([52ebb43](52ebb431b7))
* **docs:** Correct outdated references to tool kinds
([#49](https://github.com/googleapis/genai-toolbox/issues/49))
([972888b](972888b9d6))
* Handle content-type correctly
([#33](https://github.com/googleapis/genai-toolbox/issues/33))
([cf8112f](cf8112f856))


### Miscellaneous Chores

* Release 0.0.2
([#65](https://github.com/googleapis/genai-toolbox/issues/65))
([beea3c3](beea3c32d9))

---
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.0.2
2024-11-12 21:04:09 +00:00
Kurtis Van Gent
beea3c32d9 chore: release 0.0.2 (#65)
Release-As: 0.0.2
2024-11-12 13:57:27 -07:00
Kurtis Van Gent
6a8397fc9e docs: fix links to SDKs in README (#64) 2024-11-12 20:52:23 +00:00
Kurtis Van Gent
981f0b88f7 docs: update README (#62)
Update README to refer to toolbox consistently and to emphasize
interaction with orchestration frameworks.
2024-11-12 13:34:11 -07:00
Anubhav Dhawan
7af208a628 doc(llamaindex-sdk): Add a tip about passing a ClientSession to Toolbox client for optimisation. (#61) 2024-11-12 09:38:43 +00:00
Anubhav Dhawan
26347b5a5e feat(sdk): make ClientSession optional when initializing ToolboxClient (#55) 2024-11-12 09:20:19 +00:00
Twisha Bansal
a415f29639 chore(langchain-sdk): Update README (#58) 2024-11-12 08:50:52 +00:00
Twisha Bansal
7d10f58393 chore(llamaindex-sdk): Add info on how to get single tool (#60) 2024-11-12 14:18:03 +05:30
Kurtis Van Gent
efafba9033 feat: support requesting a single tool (#56)
Adds support for getting a ToolsManifest with a single tool when a GET
`/tools/$toolname` request is sent.
2024-11-11 19:35:57 +00:00
Twisha Bansal
ed15418652 chore(llamaindex-sdk): fix url in README (#57) 2024-11-11 19:33:00 +00:00
Twisha Bansal
4cf3a04b57 docs(llamaindex-sdk): add README for LlamaIndex SDK (#53)
Added LlamaIndex SDK docs

And corrected README to include LLamaIndex SDKs

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
2024-11-11 17:20:21 +00:00
Yuan
0af2222cb4 docs: add deploy to cloud run instructions (#36)
Instructions to deploy Toolbox to Cloud Run.

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Anubhav Dhawan <anubhavdhawan@google.com>
2024-11-11 09:10:43 -08:00
Anubhav Dhawan
1833fee5bc docs(langchain-sdk): update README file (#54) 2024-11-08 21:21:37 +00:00
Anubhav Dhawan
1b57ecab0d doc: Create a README file explaining the setup and sample usage with LangChain and LangGraph. (#45) 2024-11-08 13:49:16 -07:00
Twisha Bansal
1cf0d96e58 Update client.py (#51)
Minor fix
2024-11-07 10:39:39 -07:00
Twisha Bansal
b824abe72f feat: LlamaIndex SDK (#48)
Added client code for LlamaIndex SDK.

Will add README and tests in a follow up PR.
2024-11-07 05:04:09 +00:00
Twisha Bansal
972888b9d6 fix(docs): correct outdated references to tool kinds (#49) 2024-11-06 11:27:14 -07:00
Kurtis Van Gent
52ebb431b7 fix: correct source type validation for postgres-sql tool (#47)
Fixes a bug introduced in #43 where postgres-tool didn't think any of
the sources were valid.

The root cause of the bug was inconsistent usage of pointer/value in the
receiver functions. The fix updates everything to consistently use a
pointer receiver function.
2024-11-05 12:25:21 -07:00
Kurtis Van Gent
621f2c61f9 chore(docs): fix reference to pg-sql page (#44) 2024-11-01 23:22:09 +00:00
Kurtis Van Gent
f630965937 feat!: consolidate "x-postgres-generic" tools to "postgres-sql" tool (#43)
This PR introduces the following breaking change: The
`alloydb-pg-generic`, `cloud-sql-pg-generic`, and
`postgres-generic-tool` have been replaced by the `postgres-sql` tool,
which works with all 3 Postgres sources.

If you were using of the the previous tools, you will need to update it
as follows:
```diff
example_tool:
-    kind: cloud-sql-pg-generic
+    kind: postgres-sql
     source: my-cloud-sql-pg-instance
     description: some description
        statement: |
            SELECT * FROM SQL_STATEMENT;
        parameters:
        - name: country
          type: string
          description: some description
```

I'm proposing this change for the following reasons:
1. It provides greater flexibility between postgres-compatible sources
-- you can change between "postgres" and "alloydb-postgres" without
issue
2. The name "postgres-sql" is more clear that "postgres-generic" -- it
indicates it's a tool that runs SQL on the source
3. It's easier for us to maintain feature compatibility across a single
"postgres-sql" tool
2024-11-01 16:17:18 -07:00
Kurtis Van Gent
0a0d206efd docs: add documentation for tools (#40)
Adds more detailed documentation on tools and parameters.
2024-11-01 17:03:51 -06:00
Kurtis Van Gent
efe9e8bc97 chore: refactor sources/tools each into their own package (#42)
Moves all of the "source" and "tool" implementations into their own
packages. This layout makes it a bit more clear where the
implementations are, and seems likely to scale more cleanly as more
sources and tools are added.
2024-11-01 16:44:13 -06:00
Yuan
b08072a800 feat(container): add entrypoint in Dockerfile (#38)
Update binary file name within Dockerfile.
Add /app directory to mount volumes.
2024-10-31 13:33:51 -07:00
Kurtis Van Gent
bf85e6f2fc docs: add detailed documentation for sources (#37)
Adds more detailed documentation for sources.
2024-10-31 20:25:12 +00:00
Yuan
4f0335a733 docs: add developer.md (#29) 2024-10-31 12:03:22 -07:00
Yuan
0396524925 chore: deduplicate postgres implementations (#34) 2024-10-29 15:18:57 -07:00