doc(langchain-sdk): Add guidance for configuring and using authenticated tools in Toolbox. (#146)

This commit is contained in:
Anubhav Dhawan
2024-12-18 23:24:57 +05:30
committed by GitHub
parent 8ca7e91240
commit 46f8bb3bc4
2 changed files with 138 additions and 11 deletions

View File

@@ -18,9 +18,40 @@ authSources:
clientId: YOUR_GOOGLE_CLIENT_ID
```
Tip: If you are accessing Toolbox with multiple applications, each application
should register their own Client ID even if they use the same `kind` of auth
provider.
> [!TIP]
> If you are accessing Toolbox with multiple applications, each application
> should register their own Client ID even if they use the same `kind` of auth
> provider.
>
> Here's an example:
>
> ```yaml
> authSources:
> my_auth_app_1:
> kind: google
> client_id: YOUR_CLIENT_ID_1
> my_auth_app_2:
> kind: google
> client_id: YOUR_CLIENT_ID_2
>
> tools:
> my_tool:
> parameters:
> - name: user_id
> type: string
> auth_sources:
> - name: my_auth_app_1
> field: sub
> - name: my_auth_app_2
> field: sub
> ...
>
> my_tool_no_param:
> auth_required:
> - my_auth_app_1
> - my_auth_app_2
> ...
> ```
## Kinds of authSources