Skip to content

Commit

Permalink
Format code and remove unecessary returns in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tolares committed May 1, 2024
1 parent cc6be76 commit 4304550
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions examples/src/tools/stackexchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 0 additions & 2 deletions libs/langchain-community/src/tools/stackexchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4304550

Please sign in to comment.