/** * Runtime-agnostic ONNX shim. The package does not depend on any specific * onnxruntime build; the user passes their own runtime (typically * `onnxruntime-node` in Node and `onnxruntime-web` in the browser, both of * which re-export `onnxruntime-common`). * * Only the surface used by this package is typed here. We intentionally avoid * importing types from `onnxruntime-common` to keep the package install * lightweight; both runtimes are structurally compatible with `OrtRuntime`. */ export interface OrtSession { run(feeds: Record): Promise>; } export interface OrtTensor { data: Float32Array | Float64Array | Int32Array | BigInt64Array | Uint8Array; dims: readonly number[]; type: string; } export interface OrtSessionCreateOptions { executionProviders?: ReadonlyArray; graphOptimizationLevel?: "disabled" | "basic" | "extended" | "all"; [key: string]: unknown; } export interface OrtRuntime { InferenceSession: { create(model: string | ArrayBufferLike | Uint8Array, options?: OrtSessionCreateOptions): Promise; }; Tensor: new (type: "float32" | "float64" | "int32" | "int64" | "uint8" | "bool", data: Float32Array | Float64Array | Int32Array | BigInt64Array | Uint8Array, dims: readonly number[]) => OrtTensor; } /** * No `executionProviders` here on purpose: that lets the runtime pick its * default chain. On `onnxruntime-web/webgpu` that's `[webgpu, wasm]`; on * `onnxruntime-node` it's `[cpu]`. The caller can override per-load via the * `sessionOptions` argument to `SegmentationModel.load` / `EmbeddingModel.load`. */ export declare const DEFAULT_SESSION_OPTIONS: OrtSessionCreateOptions; //# sourceMappingURL=ort-runtime.d.ts.map