import type { StreamFn } from "@mariozechner/pi-agent-core"; import { streamSimple } from "@mariozechner/pi-ai"; import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; import { streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream-shared"; import { isOpenAIApiBaseUrl } from "./base-url.js";
const OPENAI_WEB_SEARCH_TOOL = { type: "web_search" } as const;
export type OpenAINativeWebSearchPatchResult =
| "payload_not_object"
| "native_tool_already_present"
| "injected";
function isRecord(value: unknown): value is Record<string, unknown> { return !!value && typeof value === "object" && !Array.isArray(value);
}
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.