diff --git a/package.json b/package.json index 0a035d96a..11e00d0ca 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ }, "devDependencies": { "@cloudflare/next-on-pages": "1.13.7", + "@eslint/js": "^9.22.0", "@next/eslint-plugin-next": "^15.1.3", "@types/mdx": "^2.0.13", "@types/node": "22.10.5", @@ -58,9 +59,12 @@ "@typescript-eslint/eslint-plugin": "^8.19.0", "@typescript-eslint/parser": "^8.19.0", "autoprefixer": "^10.4.20", + "eslint": "^9.22.0", "eslint-config-next": "^15.1.3", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-react": "^7.37.4", + "eslint-plugin-react-hooks": "^5.2.0", "globals": "^15.14.0", "husky": "^9.1.7", "lint-staged": "^15.3.0", diff --git a/pages/toolkits/search/reference.mdx b/pages/toolkits/search/reference.mdx index f6e280760..9c00f3c37 100644 --- a/pages/toolkits/search/reference.mdx +++ b/pages/toolkits/search/reference.mdx @@ -356,3 +356,13 @@ Defines the sorting options for hotel search results. - **`ye`**: Yemen - **`zm`**: Zambia - **`zw`**: Zimbabwe + + +## WalmartSortBy + +- **`RELEVANCE`**: `'relevance'` - Sort by relevance. +- **`PRICE_LOW_TO_HIGH`**: `'lowest_price_first'` - Sort by price from low to high. +- **`PRICE_HIGH_TO_LOW`**: `'highest_price_first'` - Sort by price from high to low. +- **`BEST_SELLING`**: `'best_selling_products_first'` - Sort by best selling. +- **`RATING_HIGH`**: `'highest_rating_first'` - Sort by rating from high to low. +- **`NEW_ARRIVALS`**: `'new_arrivals_first'` - Sort by new arrivals. diff --git a/pages/toolkits/search/walmart.mdx b/pages/toolkits/search/walmart.mdx new file mode 100644 index 000000000..7abf4e65d --- /dev/null +++ b/pages/toolkits/search/walmart.mdx @@ -0,0 +1,121 @@ +# Walmart Search + +import ToolInfo from "@/components/ToolInfo"; +import Badges from "@/components/Badges"; +import TabbedCodeBlock from "@/components/TabbedCodeBlock"; +import TableOfContents from "@/components/TableOfContents"; + + + + + +The Arcade Walmart Search toolkit provides a pre-built set of tools for interacting with Walmart. These tools make it easy to build agents and AI apps that can: + +- Search for products listed on Walmart stores; +- Get details about a product. + +## Install + +```bash +pip install arcade_search +``` + + + pip installing the toolkit is only needed if you are [self-hosting](/home/install/overview) Arcade. You do not need to install the toolkit if you're using Arcade Cloud. + + +## Available Tools + + + + + If you need to perform an action that's not listed here, you can [get in touch + with us](mailto:contact@arcade.dev) to request a new tool, or [create your + own tools](/home/build-tools/create-a-toolkit). + + +## SearchWalmartProducts + +
+ + +Search for products listed on Walmart stores. + +**Parameters** + +- **keywords** _(string, required)_ Keywords to search for. E.g. 'apple iphone' or 'samsung galaxy' +- **sort_by** _(enum ([WalmartSortBy](/toolkits/search/reference#walmartsortby)), optional, Defaults to `WalmartSortBy.RELEVANCE`)_ Sort the results by the specified criteria. Defaults to `WalmartSortBy.RELEVANCE`. +- **min_price** _(float, optional, Defaults to `None`)_ Minimum price to filter the results. +- **max_price** _(float, optional, Defaults to `None`)_ Maximum price to filter the results. +- **next_day_delivery** _(bool, optional, Defaults to `False`)_ Whether to filter the results by next day delivery. Defaults to False (returns all products, regardless of delivery status). +- **page** _(int, optional, Defaults to `1`)_ Page number to fetch. Defaults to 1 (first page of results). The maximum page value is 100. + + +## GetWalmartProductDetails + +
+ + +Get details about a product listed on Walmart. + +**Parameters** + +- **item_id** _(string, required)_ Item ID. E.g. '414600577'. This can be retrieved from the search results of the `SearchWalmartProducts` tool. + +## Auth + +The Arcade Walmart Search toolkit uses the [SerpAPI](https://serpapi.com/) to get product information from Walmart. + +- **Secret:** + - `SERP_API_KEY`: Your SerpAPI API key. + + Setting the `SERP_API_KEY` secret is only required if you are [self-hosting](/home/install/overview) Arcade. If you're using Arcade Cloud, the secret is already set for you. To manage your secrets, go to the [Secrets page](https://api.arcade.dev/dashboard/auth/secrets) in the Arcade Dashboard. + diff --git a/pages/toolkits/search/youtube.mdx b/pages/toolkits/search/youtube.mdx new file mode 100644 index 000000000..beb247be6 --- /dev/null +++ b/pages/toolkits/search/youtube.mdx @@ -0,0 +1,146 @@ +# YouTube Search + +import ToolInfo from "@/components/ToolInfo"; +import Badges from "@/components/Badges"; +import TabbedCodeBlock from "@/components/TabbedCodeBlock"; +import TableOfContents from "@/components/TableOfContents"; + + + + + +The Arcade YouTube Search toolkit provides a pre-built set of tools for interacting with YouTube. These tools make it easy to build agents and AI apps that can: + +- Search for videos on YouTube; +- Get details about a video. + +## Install + +```bash +pip install arcade_search +``` + + + pip installing the toolkit is only needed if you are [self-hosting](/home/install/overview) Arcade. You do not need to install the toolkit if you're using Arcade Cloud. + + +## Available Tools + + + + + If you need to perform an action that's not listed here, you can [get in touch + with us](mailto:contact@arcade.dev) to request a new tool, or [create your + own tools](/home/build-tools/create-a-toolkit). + + +## SearchYoutubeVideos + +
+ + +Search for videos on YouTube. + +**Parameters** + +- **keywords** _(string, required)_ Keywords to search for. E.g. 'apple iphone' or 'samsung galaxy' +- **`language_code`** _(string, optional, Defaults to 'en' English)_ 2-character language code to use in the YouTube search. A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes). +- **`country_code`** _(string, optional, Defaults to 'us' United States)_ 2-character country code to use in the YouTube search. A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes). +- **`next_page_token`** _(string, optional, Defaults to 'None')_ The next page token to use for pagination. Defaults to `None` (start from the first page). + + +## GetYoutubeVideoDetails + +
+ + +Get details about a video on YouTube. + +**Parameters** + +- **video_id** _(string, required)_ Video ID. E.g. '414600577'. This can be retrieved from the search results of the `SearchYoutubeVideos` tool. +- **`language_code`** _(string, optional, Defaults to 'en' English)_ 2-character language code to use in the YouTube search. A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes). +- **`country_code`** _(string, optional, Defaults to 'us' United States)_ 2-character country code to use in the YouTube search. A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes). + +## Auth + +The Arcade YouTube Search toolkit uses the [SerpAPI](https://serpapi.com/) to get video information from YouTube. + +- **Secret:** + - `SERP_API_KEY`: Your SerpAPI API key. + + Setting the `SERP_API_KEY` secret is only required if you are [self-hosting](/home/install/overview) Arcade. If you're using Arcade Cloud, the secret is already set for you. To manage your secrets, go to the [Secrets page](https://api.arcade.dev/dashboard/auth/secrets) in the Arcade Dashboard. + + + +## Default parameter values + +Language and Country are configurable through environment variables. When set, they will be used as default for YouTube tools. + +Providing a different value as `language_code` or `country_code` argument in a tool call will override the default value set in the environment variables. + +**Language** + +The language code is a 2-character code that determines the language in which the API will search and return video information. There are two environment variables: + +- `ARCADE_GOOGLE_LANGUAGE`: a default value for all Google Search tools. If not set, defaults to 'en' (English). +- `ARCADE_YOUTUBE_SEARCH_LANGUAGE`: a default value for the YouTube Search tools. If not set, defaults to `ARCADE_GOOGLE_LANGUAGE`. + +A list of supported language codes can be found [here](/toolkits/search/reference#languagecodes). + +**Country** + +The country code is a 2-character code that determines the country in which the API will search for videos: + +- `ARCADE_GOOGLE_COUNTRY`: a default value for all Google Search tools. If not set, defaults to `None`. +- `ARCADE_YOUTUBE_SEARCH_COUNTRY`: a default value for the YouTube Search tools. If not set, defaults to `ARCADE_GOOGLE_COUNTRY`. If `ARCADE_GOOGLE_COUNTRY` is not set, the default country for YouTube tools will be `us` (United States). + +A list of supported country codes can be found [here](/toolkits/search/reference#countrycodes). diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 469a6ebfd..97a03c9a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,6 +80,9 @@ importers: '@cloudflare/next-on-pages': specifier: 1.13.7 version: 1.13.7(vercel@39.3.0)(wrangler@3.103.2) + '@eslint/js': + specifier: ^9.22.0 + version: 9.22.0 '@next/eslint-plugin-next': specifier: ^15.1.3 version: 15.1.5 @@ -97,22 +100,31 @@ importers: version: 19.0.3(@types/react@19.0.7) '@typescript-eslint/eslint-plugin': specifier: ^8.19.0 - version: 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + version: 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) '@typescript-eslint/parser': specifier: ^8.19.0 - version: 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + version: 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.5.1) + eslint: + specifier: ^9.22.0 + version: 9.22.0(jiti@1.21.7) eslint-config-next: specifier: ^15.1.3 - version: 15.1.5(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + version: 15.1.5(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.18.0(jiti@1.21.7)) + version: 9.1.0(eslint@9.22.0(jiti@1.21.7)) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.3(eslint-config-prettier@9.1.0(eslint@9.18.0(jiti@1.21.7)))(eslint@9.18.0(jiti@1.21.7))(prettier@3.4.2) + version: 5.2.3(eslint-config-prettier@9.1.0(eslint@9.22.0(jiti@1.21.7)))(eslint@9.22.0(jiti@1.21.7))(prettier@3.4.2) + eslint-plugin-react: + specifier: ^7.37.4 + version: 7.37.4(eslint@9.22.0(jiti@1.21.7)) + eslint-plugin-react-hooks: + specifier: ^5.2.0 + version: 5.2.0(eslint@9.22.0(jiti@1.21.7)) globals: specifier: ^15.14.0 version: 15.14.0 @@ -139,7 +151,7 @@ importers: version: 5.7.3 typescript-eslint: specifier: ^8.19.0 - version: 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + version: 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) packages: @@ -420,28 +432,32 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.1': - resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} + '@eslint/config-array@0.19.2': + resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.1.0': + resolution: {integrity: sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.10.0': - resolution: {integrity: sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==} + '@eslint/core@0.12.0': + resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@3.2.0': - resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + '@eslint/eslintrc@3.3.0': + resolution: {integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.18.0': - resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} + '@eslint/js@9.22.0': + resolution: {integrity: sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.5': - resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.5': - resolution: {integrity: sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==} + '@eslint/plugin-kit@0.2.7': + resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@fastify/busboy@2.1.1': @@ -495,8 +511,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.1': - resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} engines: {node: '>=18.18'} '@iconify/types@2.0.0': @@ -2255,8 +2271,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-react-hooks@5.1.0: - resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} + eslint-plugin-react-hooks@5.2.0: + resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 @@ -2267,8 +2283,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-scope@8.2.0: - resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + eslint-scope@8.3.0: + resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: @@ -2279,8 +2295,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.18.0: - resolution: {integrity: sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==} + eslint@9.22.0: + resolution: {integrity: sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -5051,26 +5067,28 @@ snapshots: '@esbuild/win32-x64@0.25.0': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.18.0(jiti@1.21.7))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.22.0(jiti@1.21.7))': dependencies: - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.1': + '@eslint/config-array@0.19.2': dependencies: - '@eslint/object-schema': 2.1.5 + '@eslint/object-schema': 2.1.6 debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - '@eslint/core@0.10.0': + '@eslint/config-helpers@0.1.0': {} + + '@eslint/core@0.12.0': dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@3.2.0': + '@eslint/eslintrc@3.3.0': dependencies: ajv: 6.12.6 debug: 4.4.0 @@ -5084,13 +5102,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.18.0': {} + '@eslint/js@9.22.0': {} - '@eslint/object-schema@2.1.5': {} + '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.2.5': + '@eslint/plugin-kit@0.2.7': dependencies: - '@eslint/core': 0.10.0 + '@eslint/core': 0.12.0 levn: 0.4.1 '@fastify/busboy@2.1.1': {} @@ -5144,7 +5162,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.1': {} + '@humanwhocodes/retry@0.4.2': {} '@iconify/types@2.0.0': {} @@ -5907,15 +5925,15 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.20.0 - '@typescript-eslint/type-utils': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/utils': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/utils': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.20.0 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -5924,14 +5942,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.20.0 '@typescript-eslint/types': 8.20.0 '@typescript-eslint/typescript-estree': 8.20.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.20.0 debug: 4.4.0 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -5941,12 +5959,12 @@ snapshots: '@typescript-eslint/types': 8.20.0 '@typescript-eslint/visitor-keys': 8.20.0 - '@typescript-eslint/type-utils@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.20.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/utils': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) debug: 4.4.0 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) ts-api-utils: 2.0.0(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: @@ -5968,13 +5986,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/utils@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.22.0(jiti@1.21.7)) '@typescript-eslint/scope-manager': 8.20.0 '@typescript-eslint/types': 8.20.0 '@typescript-eslint/typescript-estree': 8.20.0(typescript@5.7.3) - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -7021,19 +7039,19 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-next@15.1.5(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3): + eslint-config-next@15.1.5(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3): dependencies: '@next/eslint-plugin-next': 15.1.5 '@rushstack/eslint-patch': 1.10.5 - '@typescript-eslint/eslint-plugin': 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/parser': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - eslint: 9.18.0(jiti@1.21.7) + '@typescript-eslint/eslint-plugin': 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + eslint: 9.22.0(jiti@1.21.7) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.18.0(jiti@1.21.7)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@1.21.7)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.18.0(jiti@1.21.7)) - eslint-plugin-react: 7.37.4(eslint@9.18.0(jiti@1.21.7)) - eslint-plugin-react-hooks: 5.1.0(eslint@9.18.0(jiti@1.21.7)) + eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@1.21.7)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@1.21.7)) + eslint-plugin-jsx-a11y: 6.10.2(eslint@9.22.0(jiti@1.21.7)) + eslint-plugin-react: 7.37.4(eslint@9.22.0(jiti@1.21.7)) + eslint-plugin-react-hooks: 5.2.0(eslint@9.22.0(jiti@1.21.7)) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: @@ -7041,9 +7059,9 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-prettier@9.1.0(eslint@9.18.0(jiti@1.21.7)): + eslint-config-prettier@9.1.0(eslint@9.22.0(jiti@1.21.7)): dependencies: - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) eslint-import-resolver-node@0.3.9: dependencies: @@ -7053,34 +7071,34 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@9.18.0(jiti@1.21.7)): + eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@1.21.7)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.0 enhanced-resolve: 5.18.0 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) fast-glob: 3.3.3 get-tsconfig: 4.9.0 is-bun-module: 1.3.0 is-glob: 4.0.3 stable-hash: 0.0.4 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@1.21.7)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@1.21.7)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@1.21.7)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@1.21.7)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - eslint: 9.18.0(jiti@1.21.7) + '@typescript-eslint/parser': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + eslint: 9.22.0(jiti@1.21.7) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.18.0(jiti@1.21.7)) + eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@1.21.7)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@1.21.7)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@1.21.7)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -7089,9 +7107,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@1.21.7)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@1.21.7)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -7103,13 +7121,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@9.18.0(jiti@1.21.7)): + eslint-plugin-jsx-a11y@6.10.2(eslint@9.22.0(jiti@1.21.7)): dependencies: aria-query: 5.3.2 array-includes: 3.1.8 @@ -7119,7 +7137,7 @@ snapshots: axobject-query: 4.1.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -7128,20 +7146,20 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-prettier@5.2.3(eslint-config-prettier@9.1.0(eslint@9.18.0(jiti@1.21.7)))(eslint@9.18.0(jiti@1.21.7))(prettier@3.4.2): + eslint-plugin-prettier@5.2.3(eslint-config-prettier@9.1.0(eslint@9.22.0(jiti@1.21.7)))(eslint@9.22.0(jiti@1.21.7))(prettier@3.4.2): dependencies: - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@9.18.0(jiti@1.21.7)) + eslint-config-prettier: 9.1.0(eslint@9.22.0(jiti@1.21.7)) - eslint-plugin-react-hooks@5.1.0(eslint@9.18.0(jiti@1.21.7)): + eslint-plugin-react-hooks@5.2.0(eslint@9.22.0(jiti@1.21.7)): dependencies: - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) - eslint-plugin-react@7.37.4(eslint@9.18.0(jiti@1.21.7)): + eslint-plugin-react@7.37.4(eslint@9.22.0(jiti@1.21.7)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -7149,7 +7167,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 9.18.0(jiti@1.21.7) + eslint: 9.22.0(jiti@1.21.7) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -7163,7 +7181,7 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-scope@8.2.0: + eslint-scope@8.3.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -7172,18 +7190,19 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.18.0(jiti@1.21.7): + eslint@9.22.0(jiti@1.21.7): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.22.0(jiti@1.21.7)) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.1 - '@eslint/core': 0.10.0 - '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.18.0 - '@eslint/plugin-kit': 0.2.5 + '@eslint/config-array': 0.19.2 + '@eslint/config-helpers': 0.1.0 + '@eslint/core': 0.12.0 + '@eslint/eslintrc': 3.3.0 + '@eslint/js': 9.22.0 + '@eslint/plugin-kit': 0.2.7 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.1 + '@humanwhocodes/retry': 0.4.2 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -7191,7 +7210,7 @@ snapshots: cross-spawn: 7.0.6 debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint-scope: 8.2.0 + eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 esquery: 1.6.0 @@ -10094,12 +10113,12 @@ snapshots: possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3): + typescript-eslint@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/parser': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/utils': 8.20.0(eslint@9.18.0(jiti@1.21.7))(typescript@5.7.3) - eslint: 9.18.0(jiti@1.21.7) + '@typescript-eslint/eslint-plugin': 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/utils': 8.20.0(eslint@9.22.0(jiti@1.21.7))(typescript@5.7.3) + eslint: 9.22.0(jiti@1.21.7) typescript: 5.7.3 transitivePeerDependencies: - supports-color diff --git a/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.js b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.js new file mode 100644 index 000000000..d98333ce5 --- /dev/null +++ b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.js @@ -0,0 +1,20 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const TOOL_NAME = "Search.SearchWalmartProducts"; + +const toolInput = { + query: "Apple iPhone", + sort_by: "lowest_price_first", + max_price: 250, + next_day_delivery: true, + page: 1, +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, +}); + +console.log(response); diff --git a/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.py b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.py new file mode 100644 index 000000000..8b01c4599 --- /dev/null +++ b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_call_tool.py @@ -0,0 +1,20 @@ +from arcadepy import Arcade +from arcade_search.enums import WalmartSortBy + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +TOOL_NAME = "Search.SearchWalmartProducts" + +tool_input = { + "query": "Apple iPhone", + "sort_by": WalmartSortBy.PRICE_LOW_TO_HIGH.value, + "max_price": 250, + "next_day_delivery": True, + "page": 1, +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, +) +print(response) diff --git a/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.js b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.js new file mode 100644 index 000000000..b698ac534 --- /dev/null +++ b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.js @@ -0,0 +1,18 @@ +import OpenAI from "openai"; + +const PROMPT = "Search for 'Apple iPhone' on Walmart. Sort by price from low to high. Filter for products with next day delivery option and a price of $250 or less."; +const TOOL_NAME = "Search.SearchWalmartProducts"; + +const client = new OpenAI({ + baseURL: "https://api.arcade.dev", + apiKey: process.env.ARCADE_API_KEY, +}); + +const response = await client.chat.completions.create({ + messages: [{ role: "user", content: PROMPT }], + model: "gpt-4o-mini", + tools: [TOOL_NAME], + tool_choice: "generate", +}); + +console.log(response.choices[0].message.content); diff --git a/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.py b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.py new file mode 100644 index 000000000..b491ad8b6 --- /dev/null +++ b/public/examples/integrations/toolkits/search/walmart/search_walmart_products_example_llm_oai.py @@ -0,0 +1,19 @@ +import os +from openai import OpenAI + +PROMPT = "Search for 'Apple iPhone' on Walmart. Sort by price from low to high. Filter for products with next day delivery option and a price of $250 or less." +TOOL_NAME = "Search.SearchWalmartProducts" + +client = OpenAI( + base_url="https://api.arcade.dev", api_key=os.environ.get("ARCADE_API_KEY") +) + +response = client.chat.completions.create( + messages=[ + {"role": "user", "content": PROMPT}, + ], + model="gpt-4o-mini", + tools=[TOOL_NAME], + tool_choice="generate", +) +print(response.choices[0].message.content) diff --git a/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.js b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.js new file mode 100644 index 000000000..fc68b072f --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.js @@ -0,0 +1,16 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const TOOL_NAME = "Search.GetYoutubeVideoDetails"; + +const toolInput = { + video_id: "dQw4w9WgXcQ", +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, +}); + +console.log(response); diff --git a/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.py b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.py new file mode 100644 index 000000000..fb526b56d --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_call_tool.py @@ -0,0 +1,15 @@ +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +TOOL_NAME = "Search.GetYoutubeVideoDetails" + +tool_input = { + "video_id": "dQw4w9WgXcQ", +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, +) +print(response) diff --git a/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.js b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.js new file mode 100644 index 000000000..08e3d4522 --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.js @@ -0,0 +1,18 @@ +import OpenAI from "openai"; + +const PROMPT = "Get the details of the video with the id 'dQw4w9WgXcQ' on YouTube."; +const TOOL_NAME = "Search.GetYoutubeVideoDetails"; + +const client = new OpenAI({ + baseURL: "https://api.arcade.dev", + apiKey: process.env.ARCADE_API_KEY, +}); + +const response = await client.chat.completions.create({ + messages: [{ role: "user", content: PROMPT }], + model: "gpt-4o-mini", + tools: [TOOL_NAME], + tool_choice: "generate", +}); + +console.log(response.choices[0].message.content); diff --git a/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.py b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.py new file mode 100644 index 000000000..606c0a7cc --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/get_youtube_video_details_example_llm_oai.py @@ -0,0 +1,19 @@ +import os +from openai import OpenAI + +PROMPT = "Get the details of the video with the id 'dQw4w9WgXcQ' on YouTube." +TOOL_NAME = "Search.GetYoutubeVideoDetails" + +client = OpenAI( + base_url="https://api.arcade.dev", api_key=os.environ.get("ARCADE_API_KEY") +) + +response = client.chat.completions.create( + messages=[ + {"role": "user", "content": PROMPT}, + ], + model="gpt-4o-mini", + tools=[TOOL_NAME], + tool_choice="generate", +) +print(response.choices[0].message.content) diff --git a/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.js b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.js new file mode 100644 index 000000000..392ef956c --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.js @@ -0,0 +1,19 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const TOOL_NAME = "Search.SearchYoutubeVideos"; + +const toolInput = { + keywords: "Apple iPhone", + language_code: "en", + country_code: "us", + next_page_token: null, +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, +}); + +console.log(response); diff --git a/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.py b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.py new file mode 100644 index 000000000..d66e895f2 --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_call_tool.py @@ -0,0 +1,18 @@ +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +TOOL_NAME = "Search.SearchYoutubeVideos" + +tool_input = { + "keywords": "Apple iPhone", + "language_code": "en", + "country_code": "us", + "next_page_token": None, +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, +) +print(response) diff --git a/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.js b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.js new file mode 100644 index 000000000..f9945ec59 --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.js @@ -0,0 +1,18 @@ +import OpenAI from "openai"; + +const PROMPT = "Search for videos about 'Apple iPhone' on YouTube."; +const TOOL_NAME = "Search.SearchYoutubeVideos"; + +const client = new OpenAI({ + baseURL: "https://api.arcade.dev", + apiKey: process.env.ARCADE_API_KEY, +}); + +const response = await client.chat.completions.create({ + messages: [{ role: "user", content: PROMPT }], + model: "gpt-4o-mini", + tools: [TOOL_NAME], + tool_choice: "generate", +}); + +console.log(response.choices[0].message.content); diff --git a/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.py b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.py new file mode 100644 index 000000000..1506f04c5 --- /dev/null +++ b/public/examples/integrations/toolkits/search/youtube/search_youtube_videos_example_llm_oai.py @@ -0,0 +1,19 @@ +import os +from openai import OpenAI + +PROMPT = "Search for videos about 'Apple iPhone' on YouTube." +TOOL_NAME = "Search.SearchYoutubeVideos" + +client = OpenAI( + base_url="https://api.arcade.dev", api_key=os.environ.get("ARCADE_API_KEY") +) + +response = client.chat.completions.create( + messages=[ + {"role": "user", "content": PROMPT}, + ], + model="gpt-4o-mini", + tools=[TOOL_NAME], + tool_choice="generate", +) +print(response.choices[0].message.content) diff --git a/public/images/icons/walmart.png b/public/images/icons/walmart.png new file mode 100644 index 000000000..81e0ee4fe Binary files /dev/null and b/public/images/icons/walmart.png differ diff --git a/src/components/custom/Toolkits/toolkits-config.ts b/src/components/custom/Toolkits/toolkits-config.ts index 32bd0c26f..b55127acf 100644 --- a/src/components/custom/Toolkits/toolkits-config.ts +++ b/src/components/custom/Toolkits/toolkits-config.ts @@ -176,6 +176,22 @@ const availableTools: Tool[] = [ category: "search", type: "arcade", }, + { + name: "Youtube Search", + image: "youtube.png", + summary: "Search and get details about YouTube videos.", + link: "/toolkits/search/youtube", + category: "search", + type: "arcade", + }, + { + name: "Walmart Search", + image: "walmart.png", + summary: "Search and get details about products listed on Walmart.", + link: "/toolkits/search/walmart", + category: "search", + type: "arcade", + }, { name: "Spotify", image: "spotify.png",