Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/extensions/exa/src/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 2 kB image not shown  

Quelle  exa-web-search-provider.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import type { WebSearchProviderPlugin } from "openclaw/plugin-sdk/provider-web-search-contract";
import { createExaWebSearchProviderBase } from "./exa-web-search-provider.shared.js";

const EXA_SEARCH_TYPES = ["auto", "neural", "fast", "deep", "deep-reasoning", "instant"] as const;
const EXA_FRESHNESS_VALUES = ["day", "week", "month", "year"] as const;
const EXA_MAX_SEARCH_COUNT = 100;

type ExaWebSearchRuntime = typeof import("./exa-web-search-provider.runtime.js");

let exaWebSearchRuntimePromise: Promise<ExaWebSearchRuntime> | undefined;

function loadExaWebSearchRuntime(): Promise<ExaWebSearchRuntime> {
  exaWebSearchRuntimePromise ??= import("./exa-web-search-provider.runtime.js");
  return exaWebSearchRuntimePromise;
}

const ExaSearchSchema = {
  type: "object",
  properties: {
    query: { type: "string", description: "Search query string." },
    count: {
      type: "number",
      description: "Number of results to return (1-100, subject to Exa search-type limits).",
      minimum: 1,
      maximum: EXA_MAX_SEARCH_COUNT,
    },
    freshness: {
      type: "string",
      enum: [...EXA_FRESHNESS_VALUES],
      description: 'Filter by time: "day", "week", "month", or "year".',
    },
    date_after: {
      type: "string",
      description: "Only results published after this date (YYYY-MM-DD).",
    },
    date_before: {
      type: "string",
      description: "Only results published before this date (YYYY-MM-DD).",
    },
    type: {
      type: "string",
      enum: [...EXA_SEARCH_TYPES],
      description:
        'Exa search mode: "auto", "neural", "fast", "deep", "deep-reasoning", or "instant".',
    },
    contents: {
      type: "object",
      properties: {
        highlights: {
          description:
            "Highlights config: true, or an object with maxCharacters, query, numSentences, or highlightsPerUrl.",
        },
        text: {
          description: "Text config: true, or an object with maxCharacters.",
        },
        summary: {
          description: "Summary config: true, or an object with query.",
        },
      },
      additionalProperties: false,
    },
  },
  additionalProperties: false,
} satisfies Record<string, unknown>;

export function createExaWebSearchProvider(): WebSearchProviderPlugin {
  return {
    ...createExaWebSearchProviderBase(),
    createTool: (ctx) => ({
      description:
        "Search the web using Exa AI. Supports neural or keyword search, publication date filters, and optional highlights or text extraction.",
      parameters: ExaSearchSchema,
      execute: async (args) => {
        const { executeExaWebSearchProviderTool } = await loadExaWebSearchRuntime();
        return await executeExaWebSearchProviderTool(ctx, args);
      },
    }),
  };
}

¤ Dauer der Verarbeitung: 0.20 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.