@@ -4,27 +4,24 @@ This SDK allows you to seamlessly integrate the functionalities of
4
4
[ Toolbox] ( https://github.com/googleapis/genai-toolbox ) into your LLM
5
5
applications, enabling advanced orchestration and interaction with GenAI models.
6
6
7
- > [ !NOTE]
8
- > Currently the SDK only supports [ LangChain] ( https://python.langchain.com/docs/introduction/ ) .
9
-
10
7
<!-- TOC -->
11
8
12
9
- [ GenAI Toolbox SDK] ( #genai-toolbox-sdk )
13
10
- [ Installation] ( #installation )
14
11
- [ Usage] ( #usage )
15
12
- [ Load a toolset] ( #load-a-toolset )
13
+ - [ Load a single tool] ( #load-a-single-tool )
16
14
- [ Use with LangChain] ( #use-with-langchain )
17
15
- [ Use with LangGraph] ( #use-with-langgraph )
18
16
- [ Represent Tools as Nodes] ( #represent-tools-as-nodes )
19
17
- [ Connect Tools with LLM] ( #connect-tools-with-llm )
20
18
- [ Manual usage] ( #manual-usage )
21
19
22
20
<!-- /TOC -->
23
-
24
21
## Installation
25
22
26
23
> [ !IMPORTANT]
27
- > This SDK is not yet available on PyPI. For now, install it from source by following these [ installation instructions] ( DEVELOPER.md ) (up to step 3) .
24
+ > This SDK is not yet available on PyPI. For now, install it from source by following these [ installation instructions] ( DEVELOPER.md ) .
28
25
29
26
You can install the Toolbox SDK for LangChain using ` pip ` .
30
27
@@ -45,7 +42,7 @@ toolbox = ToolboxClient("http://localhost:5000")
45
42
46
43
## Load a toolset
47
44
48
- You can load a toolsets, that are collections of related tools.
45
+ You can load a toolset, a collection of related tools.
49
46
50
47
``` python
51
48
# Load all tools
@@ -55,6 +52,14 @@ tools = await toolbox.load_toolset()
55
52
tools = await toolbox.load_toolset(" my-toolset" )
56
53
```
57
54
55
+ ## Load a single tool
56
+
57
+ You can also load a single tool.
58
+
59
+ ``` python
60
+ tool = await toolbox.load_tool(" my-tool" )
61
+ ```
62
+
58
63
## Use with LangChain
59
64
60
65
LangChain's agents can dynamically choose and execute tools based on the user
@@ -82,6 +87,7 @@ follow the [official guide](https://langchain-ai.github.io/langgraph/) with
82
87
minimal changes.
83
88
84
89
### Represent Tools as Nodes
90
+
85
91
Each tool generated by the SDK can be represented as a LangGraph node. The
86
92
node's functionality would encapsulate the execution of the corresponding tool.
87
93
@@ -141,4 +147,4 @@ You can also execute a tool manually using the `arun` method.
141
147
142
148
``` python
143
149
result = await tools[0 ].arun({ " name" : " Alice" , " age" : 30 })
144
- ```
150
+ ```
0 commit comments