@orqo/foundationmodels-runtime
v1.0.2
Published
Apple Foundation Models provider adapter — daemon-backed implementation of IntelligenceProvider.
Downloads
424
Maintainers
Readme
@orqo/foundationmodels-runtime
Apple Foundation Models provider adapter — daemon-backed implementation of IntelligenceProvider.
Install
pnpm add @orqo/foundationmodels-runtimeUsage
This package provides the AppleFoundationModelsProvider and CoreAIModelsProvider adapters that wire the IntelligenceProvider port from @orqo/foundationmodels-core to the local Swift daemon via @orqo/foundationmodels-client.
It is registered automatically when you call createFoundationModels() in @orqo/foundationmodels. Direct instantiation is useful when you need to configure the daemon adapter in isolation or register it alongside other providers.
import { createAppleFoundationModelsProvider } from "@orqo/foundationmodels-runtime";
import { createFoundationModels } from "@orqo/foundationmodels";
// Instantiate the daemon-backed provider directly.
const appleProvider = createAppleFoundationModelsProvider();
// Inject into the FoundationModels runtime alongside any custom providers.
const fm = await createFoundationModels({
providers: {
custom: [appleProvider],
},
});
const result = await fm.respond({ input: "Hello from the runtime layer." });
console.log(result.content);Also exports createCoreAIModelsProvider for the CoreAI backend variant.
Most applications should depend on @orqo/foundationmodels rather than this package directly.
