mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
* feat(providers): add DeepInfra provider plugin * feat(deepinfra): add media provider surfaces * fix(deepinfra): satisfy provider boundary checks * docs: add gitcrawl maintainer skill * test: include deepinfra in live media sweeps * fix: remove stale tts contract import
36 lines
983 B
TypeScript
36 lines
983 B
TypeScript
import {
|
|
isMissingEmbeddingApiKeyError,
|
|
type MemoryEmbeddingProviderAdapter,
|
|
} from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
|
|
import {
|
|
createDeepInfraEmbeddingProvider,
|
|
DEFAULT_DEEPINFRA_EMBEDDING_MODEL,
|
|
} from "./embedding-provider.js";
|
|
|
|
export const deepinfraMemoryEmbeddingProviderAdapter: MemoryEmbeddingProviderAdapter = {
|
|
id: "deepinfra",
|
|
defaultModel: DEFAULT_DEEPINFRA_EMBEDDING_MODEL,
|
|
transport: "remote",
|
|
authProviderId: "deepinfra",
|
|
autoSelectPriority: 55,
|
|
allowExplicitWhenConfiguredAuto: true,
|
|
shouldContinueAutoSelection: isMissingEmbeddingApiKeyError,
|
|
create: async (options) => {
|
|
const { provider, client } = await createDeepInfraEmbeddingProvider({
|
|
...options,
|
|
provider: "deepinfra",
|
|
fallback: "none",
|
|
});
|
|
return {
|
|
provider,
|
|
runtime: {
|
|
id: "deepinfra",
|
|
cacheKeyData: {
|
|
provider: "deepinfra",
|
|
model: client.model,
|
|
},
|
|
},
|
|
};
|
|
},
|
|
};
|