needle2 / wasm-component /needle.wit
Henry Ndubuaku
Replace binaries from production build
b739205 verified
Raw History Blame Contribute Delete
457 Bytes
package cactus:needle@2.0.0;
interface engine {
record failure {
code: s32,
message: string,
}
load: func(model: list<u8>) -> result<_, failure>;
init: func(
system-prompt: option<string>,
tools-json: option<string>,
tool-index-path: option<string>,
) -> result<u32, failure>;
complete: func(
input: string,
max-new-tokens: u32,
) -> result<string, failure>;
reset: func();
}
world needle {
export engine;
}