@devries-cameron20 / composio-1 / commits / 11917f073
Fork 0

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 11917f0730d741a99524b89e6a5337dd1f4a5ae7
2 files changed +4 -4
packages/toolsets/langchain/src/index.ts
+4 -4
@@ -1,9 +1,9 @@
1 -import { BaseComposioToolset, Composio, jsonSchemaToModel, Tool, ToolListParams } from "@composio/core";
1 +import { BaseComposioToolset, jsonSchemaToModel, Tool, ToolListParams } from "@composio/core";
2 import { DynamicStructuredTool } from "@langchain/core/tools";
3
4
5 -
6 -export class LangchainToolset extends BaseComposioToolset<Array<DynamicStructuredTool>, DynamicStructuredTool> {
5 +export type LangChainToolCollection = Array<DynamicStructuredTool>;
6 +export class LangchainToolset extends BaseComposioToolset<LangChainToolCollection, DynamicStructuredTool> {
7 static FRAMEWORK_NAME = "langchain";
8 readonly FILE_NAME: string = "toolsets/langchain/src/index.ts";
9
@@ -46,7 +46,7 @@ export class LangchainToolset extends BaseComposioToolset<Array<DynamicStructure
46 * @param params - The parameters for the tool list.
47 * @returns The tools.
48 */
49 - async getTools(params?: ToolListParams): Promise<Array<DynamicStructuredTool>> {
49 + async getTools(params?: ToolListParams): Promise<LangChainToolCollection> {
50 const tools = await this.client?.tools.list(params);
51 return tools?.items.map((tool) => this._wrapTool(tool as Tool)) ?? [];
52 }
packages/toolsets/langchain/src/utils/schema.ts