Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoroger committed Nov 30, 2024
1 parent 67d7168 commit 510433b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
14 changes: 8 additions & 6 deletions docs/core_docs/docs/integrations/tools/google_trends.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import CodeBlock from "@theme/CodeBlock";

# Google Trends Tool

The Google Trends Tool allows your agent to utilize the Google Trends API from Serp API to retrieve and analyze search interest data.
The Google Trends Tool allows your agent to utilize the Google Trends API from SerpApi to retrieve and analyze search interest data.
This can be useful for understanding trending topics, regional search interest, and historical popularity of search terms.

For API details see [here](https://serpapi.com/google-trends-api)

## Setup

To use this tool, you'll need to configure access to the Google Trends API. The integration relies on the unofficial
Google Trends library, as Google does not provide a formal API for accessing trends data.
To use this tool, you will need to configure access to the Google Trends API from SerpApi.

Get an API key from [SERPApi](https://serpapi.com/users/sign_in)
Get an API key from [SerpApi](https://serpapi.com/users/sign_in)

Then, set your API key as `process.env.GOOGLE_PLACES_API_KEY` or pass it in as an `apiKey` constructor argument.
Then, set your API key as `process.env.SERPAPI_API_KEY` or pass it in as an `apiKey` constructor argument.

## Usage

Expand All @@ -34,4 +35,5 @@ import ToolExample from "@examples/tools/google_trends.ts";

## Related

- Tool [https://serpapi.com/google-trends-api]
- Tool [conceptual guide](/docs/concepts/tools)
- Tool [how-to guides](/docs/how_to/#tools)
1 change: 0 additions & 1 deletion libs/langchain-community/src/load/import_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export * as tools__dynamic from "../tools/dynamic.js";
export * as tools__dataforseo_api_search from "../tools/dataforseo_api_search.js";
export * as tools__google_custom_search from "../tools/google_custom_search.js";
export * as tools__google_places from "../tools/google_places.js";
export * as tools__google_trends from "../tools/google_trends.js";
export * as tools__google_routes from "../tools/google_routes.js";
export * as tools__ifttt from "../tools/ifttt.js";
export * as tools__searchapi from "../tools/searchapi.js";
Expand Down
10 changes: 0 additions & 10 deletions libs/langchain-scripts/src/_data/importMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2920,16 +2920,6 @@ export const importMap: Array<DeprecatedEntrypoint> = [
new: "@langchain/community/tools/google_places",
namedImport: "GooglePlacesAPI",
},
{
old: "langchain/tools/google_trends",
new: "@langchain/community/tools/google_trends",
namedImport: "GoogleTrendsAPIParams",
},
{
old: "langchain/tools/google_trends",
new: "@langchain/community/tools/google_trends",
namedImport: "GoogleTrendsAPI",
},
{
old: "langchain/tools/*",
new: "@langchain/community/tools/google_custom_search",
Expand Down

0 comments on commit 510433b

Please sign in to comment.