File size: 457 Bytes
b739205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
}