Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Fix types
haxzie committed
Apr 21, 2025 at 20:01 UTC
22d2f51e4b4ecb2b0ad15951996b884759cf2cda
2 files changed
+3
-3
packages/toolsets/langchain/src/index.ts
+3
-3
@@ -13,8 +13,8 @@ import { BaseComposioToolset, jsonSchemaToModel, Tool, ToolListParams } from "@c
13
import { DynamicStructuredTool } from "@langchain/core/tools";
14
15
16
-
17
-export class LangchainToolset extends BaseComposioToolset<Array<DynamicStructuredTool>, DynamicStructuredTool> {
16
+export type LangChainToolCollection = Array<DynamicStructuredTool>;
17
+export class LangchainToolset extends BaseComposioToolset<LangChainToolCollection, DynamicStructuredTool> {
18
static FRAMEWORK_NAME = "langchain";
19
readonly FILE_NAME: string = "toolsets/langchain/src/index.ts";
20
@@ -57,7 +57,7 @@ export class LangchainToolset extends BaseComposioToolset<Array<DynamicStructure
57
* @param params - The parameters for the tool list.
58
* @returns The tools.
59
*/
60
- async getTools(params?: ToolListParams): Promise<Array<DynamicStructuredTool>> {
60
+ async getTools(params?: ToolListParams): Promise<LangChainToolCollection> {
61
const tools = await this.client?.tools.list(params);
62
return tools?.items.map((tool) => this._wrapTool(tool as Tool)) ?? [];
63
}