UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

42 lines (41 loc) • 1.67 kB
import { _ as runLiveProviderCatalog } from "../../provider-catalog-live-runtime-D-M7f_ww.mjs"; import { t as defineSingleProviderPluginEntry } from "../../provider-entry-CRfSFsHE.mjs"; import { i as openclaw_plugin_default } from "../../models-C3scLwe8.mjs"; import { r as applyHuggingfaceConnectionConfig, t as HUGGINGFACE_DEFAULT_MODEL_REF } from "../../onboard-6YCeU2jY.mjs"; import { t as buildHuggingfaceProvider } from "../../provider-catalog-BKIIfjrt.mjs"; //#region extensions/huggingface/index.ts const PROVIDER_ID = "huggingface"; var huggingface_default = defineSingleProviderPluginEntry({ id: PROVIDER_ID, name: "Hugging Face Provider", description: "Bundled Hugging Face provider plugin", manifest: openclaw_plugin_default, provider: { label: "Hugging Face", docsPath: "/providers/huggingface", envVars: ["HUGGINGFACE_HUB_TOKEN", "HF_TOKEN"], manifestAuth: { defaultModel: HUGGINGFACE_DEFAULT_MODEL_REF, applyConfig: applyHuggingfaceConnectionConfig }, catalog: { run: async (e) => { if ((e.config?.plugins?.entries?.[PROVIDER_ID]?.config)?.discovery?.enabled === false) return null; const { apiKey: t, discoveryApiKey: n, profileId: r } = e.resolveProviderApiKey(PROVIDER_ID); if (!t) return null; const run = async () => ({ provider: { ...await buildHuggingfaceProvider(n, { discoveryMode: "strict" }), apiKey: t } }); return n ? await runLiveProviderCatalog({ providerId: PROVIDER_ID, profileId: r, run }) : await run(); }, staticRun: async () => ({ provider: await buildHuggingfaceProvider() }) } } }); //#endregion export { huggingface_default as default };