@trymirai/uzu 0.1.45 → 0.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,7 +26,7 @@ Add the `uzu` dependency to your project's `package.json`:
26
26
 
27
27
  ```json
28
28
  "dependencies": {
29
- "@trymirai/uzu": "0.1.45"
29
+ "@trymirai/uzu": "0.1.47"
30
30
  }
31
31
  ```
32
32
 
@@ -6,5 +6,6 @@ export declare class ChatSession {
6
6
  private readonly napiChatSession;
7
7
  constructor(napiChatSession: NapiChatSession);
8
8
  run(input: Input, config?: RunConfig, progress?: (partialOutput: Output) => boolean): Output;
9
+ reset(): void;
9
10
  }
10
11
  //# sourceMappingURL=chatSession.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatSession.d.mts","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAwB;OACxD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,eAAe,EAAE,eAAe;IAI5C,GAAG,CACC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,SAA+B,EACvC,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,MAAM;CAOZ"}
1
+ {"version":3,"file":"chatSession.d.mts","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAwB;OACxD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,eAAe,EAAE,eAAe;IAI5C,GAAG,CACC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,SAA+B,EACvC,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,MAAM;IAQT,KAAK,IAAI,IAAI;CAGhB"}
@@ -6,5 +6,6 @@ export declare class ChatSession {
6
6
  private readonly napiChatSession;
7
7
  constructor(napiChatSession: NapiChatSession);
8
8
  run(input: Input, config?: RunConfig, progress?: (partialOutput: Output) => boolean): Output;
9
+ reset(): void;
9
10
  }
10
11
  //# sourceMappingURL=chatSession.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatSession.d.ts","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAwB;OACxD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,eAAe,EAAE,eAAe;IAI5C,GAAG,CACC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,SAA+B,EACvC,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,MAAM;CAOZ"}
1
+ {"version":3,"file":"chatSession.d.ts","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,IAAI,eAAe,EAAwB;OACxD,EAAE,KAAK,EAAE;OACT,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,eAAe,EAAE,eAAe;IAI5C,GAAG,CACC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,SAA+B,EACvC,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAoB,GAC1D,MAAM;IAQT,KAAK,IAAI,IAAI;CAGhB"}
@@ -14,6 +14,9 @@ class ChatSession {
14
14
  const napiOutput = this.napiChatSession.run(napiInput, napiConfig, napiProgress);
15
15
  return output_1.Output.fromNapi(napiOutput);
16
16
  }
17
+ reset() {
18
+ this.napiChatSession.reset();
19
+ }
17
20
  }
18
21
  exports.ChatSession = ChatSession;
19
22
  //# sourceMappingURL=chatSession.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatSession.js","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":";;;AAEA,wCAAkC;AAClC,8CAAwC;AAExC,MAAa,WAAW;IAGpB,YAAY,eAAgC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,GAAG,CACC,KAAY,EACZ,SAAoB,qBAAS,CAAC,OAAO,EAAE,EACvC,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,CAAC,aAAyB,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;QAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;QACjF,OAAO,eAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACJ;AAlBD,kCAkBC"}
1
+ {"version":3,"file":"chatSession.js","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":";;;AAEA,wCAAkC;AAClC,8CAAwC;AAExC,MAAa,WAAW;IAGpB,YAAY,eAAgC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,GAAG,CACC,KAAY,EACZ,SAAoB,qBAAS,CAAC,OAAO,EAAE,EACvC,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,CAAC,aAAyB,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;QAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;QACjF,OAAO,eAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACJ;AAtBD,kCAsBC"}
@@ -11,5 +11,8 @@ export class ChatSession {
11
11
  const napiOutput = this.napiChatSession.run(napiInput, napiConfig, napiProgress);
12
12
  return Output.fromNapi(napiOutput);
13
13
  }
14
+ reset() {
15
+ this.napiChatSession.reset();
16
+ }
14
17
  }
15
18
  //# sourceMappingURL=chatSession.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatSession.mjs","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,MAAM,OAAO,WAAW;IAGpB,YAAY,eAAgC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,GAAG,CACC,KAAY,EACZ,SAAoB,SAAS,CAAC,OAAO,EAAE,EACvC,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,CAAC,aAAyB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;QAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;QACjF,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACJ"}
1
+ {"version":3,"file":"chatSession.mjs","sourceRoot":"","sources":["../src/bridging/chatSession.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE;OACV,EAAE,SAAS,EAAE;AAEpB,MAAM,OAAO,WAAW;IAGpB,YAAY,eAAgC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IAED,GAAG,CACC,KAAY,EACZ,SAAoB,SAAS,CAAC,OAAO,EAAE,EACvC,WAA+C,GAAG,EAAE,CAAC,IAAI;QAEzD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,CAAC,aAAyB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;QAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;QACjF,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACJ"}
@@ -4,8 +4,7 @@ export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
4
4
  private readonly napiSamplingMethod;
5
5
  private constructor();
6
6
  static greedy(): SamplingMethod;
7
- static temperature(temperature: number): SamplingMethod;
8
- static topP(topP: number): SamplingMethod;
7
+ static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod;
9
8
  toNapi(): NapiSamplingMethod;
10
9
  }
11
10
  //# sourceMappingURL=samplingMethod.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"samplingMethod.d.mts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc;IAQvD,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKzC,MAAM,IAAI,kBAAkB;CAG/B"}
1
+ {"version":3,"file":"samplingMethod.d.mts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc;IAgBvG,MAAM,IAAI,kBAAkB;CAG/B"}
@@ -4,8 +4,7 @@ export declare class SamplingMethod implements ToNapi<NapiSamplingMethod> {
4
4
  private readonly napiSamplingMethod;
5
5
  private constructor();
6
6
  static greedy(): SamplingMethod;
7
- static temperature(temperature: number): SamplingMethod;
8
- static topP(topP: number): SamplingMethod;
7
+ static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod;
9
8
  toNapi(): NapiSamplingMethod;
10
9
  }
11
10
  //# sourceMappingURL=samplingMethod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"samplingMethod.d.ts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc;IAQvD,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKzC,MAAM,IAAI,kBAAkB;CAG/B"}
1
+ {"version":3,"file":"samplingMethod.d.ts","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE;OACxC,EAAE,MAAM,EAAE;AAEjB,qBAAa,cAAe,YAAW,MAAM,CAAC,kBAAkB,CAAC;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,OAAO;IAIP,MAAM,CAAC,MAAM,IAAI,cAAc;IAK/B,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc;IAgBvG,MAAM,IAAI,kBAAkB;CAG/B"}
@@ -9,15 +9,19 @@ class SamplingMethod {
9
9
  const napiSamplingMethod = { type: 'Greedy' };
10
10
  return new SamplingMethod(napiSamplingMethod);
11
11
  }
12
- static temperature(temperature) {
13
- const napiSamplingMethod = {
14
- type: 'Temperature',
15
- temperature,
12
+ static stochastic(temperature, topK, topP) {
13
+ let napiSamplingMethod = {
14
+ type: 'Stochastic',
16
15
  };
17
- return new SamplingMethod(napiSamplingMethod);
18
- }
19
- static topP(topP) {
20
- const napiSamplingMethod = { type: 'TopP', topP };
16
+ if (temperature !== null) {
17
+ napiSamplingMethod.temperature = temperature;
18
+ }
19
+ if (topK !== null) {
20
+ napiSamplingMethod.topK = topK;
21
+ }
22
+ if (topP !== null) {
23
+ napiSamplingMethod.topP = topP;
24
+ }
21
25
  return new SamplingMethod(napiSamplingMethod);
22
26
  }
23
27
  toNapi() {
@@ -1 +1 @@
1
- {"version":3,"file":"samplingMethod.js","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,WAAmB;QAClC,MAAM,kBAAkB,GAAuB;YAC3C,IAAI,EAAE,aAAa;YACnB,WAAW;SACd,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ;AA5BD,wCA4BC"}
1
+ {"version":3,"file":"samplingMethod.js","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,WAA0B,EAAE,IAAmB,EAAE,IAAmB;QAClF,IAAI,kBAAkB,GAAuB;YACzC,IAAI,EAAE,YAAY;SACrB,CAAC;QACF,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACvB,kBAAkB,CAAC,WAAW,GAAG,WAAW,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ;AA/BD,wCA+BC"}
@@ -6,15 +6,19 @@ export class SamplingMethod {
6
6
  const napiSamplingMethod = { type: 'Greedy' };
7
7
  return new SamplingMethod(napiSamplingMethod);
8
8
  }
9
- static temperature(temperature) {
10
- const napiSamplingMethod = {
11
- type: 'Temperature',
12
- temperature,
9
+ static stochastic(temperature, topK, topP) {
10
+ let napiSamplingMethod = {
11
+ type: 'Stochastic',
13
12
  };
14
- return new SamplingMethod(napiSamplingMethod);
15
- }
16
- static topP(topP) {
17
- const napiSamplingMethod = { type: 'TopP', topP };
13
+ if (temperature !== null) {
14
+ napiSamplingMethod.temperature = temperature;
15
+ }
16
+ if (topK !== null) {
17
+ napiSamplingMethod.topK = topK;
18
+ }
19
+ if (topP !== null) {
20
+ napiSamplingMethod.topP = topP;
21
+ }
18
22
  return new SamplingMethod(napiSamplingMethod);
19
23
  }
20
24
  toNapi() {
@@ -1 +1 @@
1
- {"version":3,"file":"samplingMethod.mjs","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,WAAmB;QAClC,MAAM,kBAAkB,GAAuB;YAC3C,IAAI,EAAE,aAAa;YACnB,WAAW;SACd,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACtE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
1
+ {"version":3,"file":"samplingMethod.mjs","sourceRoot":"","sources":["../src/bridging/samplingMethod.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IAGvB,YAAoB,kBAAsC;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,MAAM;QACT,MAAM,kBAAkB,GAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAClE,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,WAA0B,EAAE,IAAmB,EAAE,IAAmB;QAClF,IAAI,kBAAkB,GAAuB;YACzC,IAAI,EAAE,YAAY;SACrB,CAAC;QACF,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACvB,kBAAkB,CAAC,WAAW,GAAG,WAAW,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
package/napi/uzu.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  export declare class ChatSession {
4
4
  run(input: Input, config: RunConfig, progress?: (arg: Output) => boolean | undefined | null): Output
5
+ reset(): void
5
6
  }
6
7
 
7
8
  export declare class Engine {
@@ -173,8 +174,7 @@ export interface RunStats {
173
174
 
174
175
  export type SamplingMethod =
175
176
  | { type: 'Greedy' }
176
- | { type: 'Temperature', temperature: number }
177
- | { type: 'TopP', topP: number }
177
+ | { type: 'Stochastic', temperature?: number, topK?: number, topP?: number }
178
178
 
179
179
  export type SamplingPolicy =
180
180
  | { type: 'Default' }
package/napi/uzu.node CHANGED
Binary file
package/package.json CHANGED
@@ -98,5 +98,5 @@
98
98
  },
99
99
  "type": "commonjs",
100
100
  "types": "./index.d.ts",
101
- "version": "0.1.45"
101
+ "version": "0.1.47"
102
102
  }
@@ -21,4 +21,8 @@ export class ChatSession {
21
21
  const napiOutput = this.napiChatSession.run(napiInput, napiConfig, napiProgress);
22
22
  return Output.fromNapi(napiOutput);
23
23
  }
24
+
25
+ reset(): void {
26
+ this.napiChatSession.reset();
27
+ }
24
28
  }
@@ -13,16 +13,19 @@ export class SamplingMethod implements ToNapi<NapiSamplingMethod> {
13
13
  return new SamplingMethod(napiSamplingMethod);
14
14
  }
15
15
 
16
- static temperature(temperature: number): SamplingMethod {
17
- const napiSamplingMethod: NapiSamplingMethod = {
18
- type: 'Temperature',
19
- temperature,
16
+ static stochastic(temperature: number | null, topK: number | null, topP: number | null): SamplingMethod {
17
+ let napiSamplingMethod: NapiSamplingMethod = {
18
+ type: 'Stochastic',
20
19
  };
21
- return new SamplingMethod(napiSamplingMethod);
22
- }
23
-
24
- static topP(topP: number): SamplingMethod {
25
- const napiSamplingMethod: NapiSamplingMethod = { type: 'TopP', topP };
20
+ if (temperature !== null) {
21
+ napiSamplingMethod.temperature = temperature;
22
+ }
23
+ if (topK !== null) {
24
+ napiSamplingMethod.topK = topK;
25
+ }
26
+ if (topP !== null) {
27
+ napiSamplingMethod.topP = topP;
28
+ }
26
29
  return new SamplingMethod(napiSamplingMethod);
27
30
  }
28
31
 
package/src/napi/uzu.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  export declare class ChatSession {
4
4
  run(input: Input, config: RunConfig, progress?: (arg: Output) => boolean | undefined | null): Output
5
+ reset(): void
5
6
  }
6
7
 
7
8
  export declare class Engine {
@@ -173,8 +174,7 @@ export interface RunStats {
173
174
 
174
175
  export type SamplingMethod =
175
176
  | { type: 'Greedy' }
176
- | { type: 'Temperature', temperature: number }
177
- | { type: 'TopP', topP: number }
177
+ | { type: 'Stochastic', temperature?: number, topK?: number, topP?: number }
178
178
 
179
179
  export type SamplingPolicy =
180
180
  | { type: 'Default' }
package/src/napi/uzu.node CHANGED
Binary file
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.45';
1
+ export const VERSION = '0.1.47';
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.45";
1
+ export declare const VERSION = "0.1.47";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.45";
1
+ export declare const VERSION = "0.1.47";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.45';
4
+ exports.VERSION = '0.1.47';
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.45';
1
+ export const VERSION = '0.1.47';
2
2
  //# sourceMappingURL=version.mjs.map