




















@@ -2,7 +2,6 @@ import {
22normalizeLowercaseStringOrEmpty,
33normalizeOptionalString,
44} from "openclaw/plugin-sdk/text-runtime";
5-import { Type } from "typebox";
6576export type BraveConfig = {
87mode?: string;
@@ -119,7 +118,6 @@ const BRAVE_SEARCH_LANG_ALIASES: Record<string, string> = {
119118};
120119121120const BRAVE_UI_LANG_LOCALE = /^([a-z]{2})-([a-z]{2})$/i;
122-const MAX_BRAVE_SEARCH_COUNT = 10;
123121124122function normalizeBraveSearchLang(value: string | undefined): string | undefined {
125123if (!value) {
@@ -226,54 +224,3 @@ export function mapBraveLlmContextResults(
226224siteName: resolveSiteName(entry.url) || undefined,
227225}));
228226}
229-230-export function createBraveSchema() {
231-return Type.Object({
232-query: Type.String({ description: "Search query string." }),
233-count: Type.Optional(
234-Type.Number({
235-description: "Number of results to return (1-10).",
236-minimum: 1,
237-maximum: MAX_BRAVE_SEARCH_COUNT,
238-}),
239-),
240-country: Type.Optional(
241-Type.String({
242-description:
243-"2-letter country code for region-specific results (e.g., 'DE', 'US', 'ALL'). Default: 'US'.",
244-}),
245-),
246-language: Type.Optional(
247-Type.String({
248-description: "ISO 639-1 language code for results (e.g., 'en', 'de', 'fr').",
249-}),
250-),
251-freshness: Type.Optional(
252-Type.String({
253-description: "Filter by time: 'day' (24h), 'week', 'month', or 'year'.",
254-}),
255-),
256-date_after: Type.Optional(
257-Type.String({
258-description: "Only results published after this date (YYYY-MM-DD).",
259-}),
260-),
261-date_before: Type.Optional(
262-Type.String({
263-description: "Only results published before this date (YYYY-MM-DD).",
264-}),
265-),
266-search_lang: Type.Optional(
267-Type.String({
268-description:
269-"Brave language code for search results (e.g., 'en', 'de', 'en-gb', 'zh-hans', 'zh-hant', 'pt-br').",
270-}),
271-),
272-ui_lang: Type.Optional(
273-Type.String({
274-description:
275-"Locale code for UI elements in language-region format (e.g., 'en-US', 'de-DE', 'fr-FR', 'tr-TR'). Must include region subtag.",
276-}),
277-),
278-});
279-}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。