From 4304550e3dc0bd4c3a46d803c9d6c88b0c55a362 Mon Sep 17 00:00:00 2001 From: Henry Lagarde <henrylagarde@hotmail.fr> Date: Wed, 1 May 2024 08:55:37 +0000 Subject: [PATCH] Format code and remove unecessary returns in docs --- examples/src/tools/stackexchange.ts | 8 ++++++-- libs/langchain-community/src/tools/stackexchange.ts | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/src/tools/stackexchange.ts b/examples/src/tools/stackexchange.ts index 97c7d0cc5e45..da4a3e67f5b9 100644 --- a/examples/src/tools/stackexchange.ts +++ b/examples/src/tools/stackexchange.ts @@ -9,10 +9,14 @@ console.log(result); const stackExchangeTitleTool = new StackExchangeAPI({ queryType: "title", }); -const titleResult = await stackExchangeTitleTool.invoke("zsh: command not found: python"); +const titleResult = await stackExchangeTitleTool.invoke( + "zsh: command not found: python" +); console.log(titleResult); // Get results from StackExchange API with bad query const stackExchangeBadTool = new StackExchangeAPI(); -const badResult = await stackExchangeBadTool.invoke("sjefbsmnazdkhbazkbdoaencopebfoubaef"); +const badResult = await stackExchangeBadTool.invoke( + "sjefbsmnazdkhbazkbdoaencopebfoubaef" +); console.log(badResult); diff --git a/libs/langchain-community/src/tools/stackexchange.ts b/libs/langchain-community/src/tools/stackexchange.ts index 765535611b73..b61b1e39c4d1 100644 --- a/libs/langchain-community/src/tools/stackexchange.ts +++ b/libs/langchain-community/src/tools/stackexchange.ts @@ -142,7 +142,6 @@ export class StackExchangeAPI extends Tool { * @param params Additional parameters passed to the endpoint * @param page Number of the page to retrieve * @param filter Filtering properties - * @returns */ private async _fetch<T>( endpoint: string, @@ -180,7 +179,6 @@ export class StackExchangeAPI extends Tool { /** * Fetch the result of a specific endpoint * @param endpointUrl Endpoint to call - * @returns */ private async _makeRequest<T>(endpointUrl: string): Promise<T> { try {