Skip to content

Commit

Permalink
feat(tools): rename GoogleCustomSearch to GoogleSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Oct 2, 2024
1 parent fd790e6 commit 087351f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { GoogleSearchTool, GoogleSearchToolOutput } from "@/tools/search/googleCustomSearch.js";
import { GoogleSearchTool, GoogleSearchToolOutput } from "@/tools/search/googleSearch.js";
import { vi, describe, it, expect, beforeEach } from "vitest";
import { SlidingCache } from "@/cache/slidingCache.js";
import { verifyDeserialization } from "@tests/e2e/utils.js";
Expand Down Expand Up @@ -59,7 +59,7 @@ describe("GoogleCustomSearch Tool", () => {

it("is a valid tool", () => {
expect(googleSearchTool).toBeDefined();
expect(googleSearchTool.name).toBe("GoogleCustomSearch");
expect(googleSearchTool.name).toBe("GoogleSearch");
expect(googleSearchTool.description).toBeDefined();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class GoogleSearchTool extends Tool<
GoogleSearchToolOptions,
GoogleSearchToolRunOptions
> {
name = "GoogleCustomSearch";
name = "GoogleSearch";
description = `Search a query using Google Custom Search Engine.
Useful for when you need to answer questions or find relevant content on all or specific websites.
Output is a list of relevant websites with descriptions.`;
Expand Down Expand Up @@ -99,7 +99,7 @@ export class GoogleSearchTool extends Tool<
throw new ValueError(
[
`"apiKey" or "cseId" must both be provided.`,
`Either set them directly or put them in ENV ("WATSONX_ACCESS_TOKEN" / "WATSONX_API_KEY")`,
`Either set them directly or put them in ENV ("GOOGLE_API_KEY" / "GOOGLE_CSE_ID")`,
].join("\n"),
);
}
Expand Down

0 comments on commit 087351f

Please sign in to comment.