@opentiny/genui-sdk-server 1.0.0-beta.2 → 1.0.0

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/dist/cli.js CHANGED
@@ -2,52 +2,52 @@
2
2
  import v from "dotenv";
3
3
  import b from "node:path";
4
4
  import { Command as B } from "commander";
5
- import { s as C } from "./start-server-4eW5WScr.js";
6
- const e = c;
7
- (function(o, x) {
8
- const n = c, t = o();
9
- for (; ; )
10
- try {
11
- if (-parseInt(n(309)) / 1 + -parseInt(n(336)) / 2 * (parseInt(n(331)) / 3) + -parseInt(n(320)) / 4 * (parseInt(n(330)) / 5) + parseInt(n(306)) / 6 + parseInt(n(321)) / 7 + -parseInt(n(332)) / 8 + parseInt(n(334)) / 9 === x) break;
12
- t.push(t.shift());
13
- } catch {
14
- t.push(t.shift());
15
- }
16
- })(y, 745865);
17
- function c(o, x) {
18
- o = o - 296;
19
- const n = y();
20
- let t = n[o];
21
- if (c.JNIAud === void 0) {
22
- var a = function(s) {
23
- const l = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
24
- let f = "", u = "";
25
- for (let r = 0, p, i, U = 0; i = s.charAt(U++); ~i && (p = r % 4 ? p * 64 + i : i, r++ % 4) ? f += String.fromCharCode(255 & p >> (-2 * r & 6)) : 0)
26
- i = l.indexOf(i);
27
- for (let r = 0, p = f.length; r < p; r++)
28
- u += "%" + ("00" + f.charCodeAt(r).toString(16)).slice(-2);
5
+ import { s as C } from "./start-server-D_i_i4to.js";
6
+ const e = r;
7
+ function r(n, x) {
8
+ n = n - 201;
9
+ const c = m();
10
+ let o = c[n];
11
+ if (r.eMCBVO === void 0) {
12
+ var s = function(t) {
13
+ const y = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=";
14
+ let a = "", u = "";
15
+ for (let d = 0, f, i, A = 0; i = t.charAt(A++); ~i && (f = d % 4 ? f * 64 + i : i, d++ % 4) ? a += String.fromCharCode(255 & f >> (-2 * d & 6)) : 0)
16
+ i = y.indexOf(i);
17
+ for (let d = 0, f = a.length; d < f; d++)
18
+ u += "%" + ("00" + a.charCodeAt(d).toString(16)).slice(-2);
29
19
  return decodeURIComponent(u);
30
20
  };
31
- c.Oycahb = a, c.gOjGNF = {}, c.JNIAud = !0;
21
+ r.bSCpQl = s, r.QHrUtL = {}, r.eMCBVO = !0;
32
22
  }
33
- const m = n[0], _ = o + m, d = c.gOjGNF[_];
34
- return d ? t = d : (t = c.Oycahb(t), c.gOjGNF[_] = t), t;
23
+ const p = c[0], _ = n + p, l = r.QHrUtL[_];
24
+ return l ? o = l : (o = r.bSCpQl(o), r.QHrUtL[_] = o), o;
35
25
  }
36
- function y() {
37
- const o = ["phbVCNq+", "B3b0Aw9U", "lwGSic0TAgvSCa", "qvbjx0Tfwq", "zgvZy3jPChrPBW", "mJm5ntbfquzpq2m", "mtjxz1vUB3e", "mJC1mtiWmfHxBfnMtW", "6iEQ5A6A5lMj546V5Akd5y+y6yEp5PAh5lU26lEV", "mtmZmZyYmZzouxfWDKW", "yxjNDG", "mZa0mtq4yLLIwKjz", "C2vYDMvY", "ue9sva", "5PYn5yQH5zcV5yQO56UV5y+J77Yi6BUy6k6Kia", "zw52", "ieDLBLvj", "5P+L55Yl5zg95lUK5BIU5yQP5l+H5OgV", "Aw9UieHuvfaGCW", "Bwf4qxr0zw1WDa", "mZeWmo+8JoAiLUIaHEs9V+EuQoEoRW", "5Akd5lIT6k6+572Uiefqsv9l", "y29UzMLN", "y3DK", "zxjYB3i", "odyYndq2mg1HDKzpqq", "CMvZB2X2zq", "zxHPDa", "nZCXndi4CKTZwKHJ", "5Akd5y+y6yEpifbpuLtVViK", "AgvSCe9WDgLVBG", "Cgf0Aa", "ywn0Aw9U", "lwuSic0Tzw52rG", "zxj2AwnLigzVCG", "yxbPs2v5", "ic5LBNyG5OIw57o757UF546V", "5B6e77Yi6BUy6k6K6k+75y+w5B2t5yMn55UU5B2v", "lMvUDG", "nZyWAeHxv052", "mZiYmJyYnvrJvfnuza", "5lIl55Qeic5LBNBVViK", "CgfYC2u", "Cg9YDa"];
38
- return y = function() {
39
- return o;
40
- }, y();
26
+ (function(n, x) {
27
+ const c = r, o = n();
28
+ for (; ; )
29
+ try {
30
+ if (parseInt(c(208)) / 1 + -parseInt(c(207)) / 2 + parseInt(c(227)) / 3 + -parseInt(c(206)) / 4 + -parseInt(c(242)) / 5 + -parseInt(c(211)) / 6 + parseInt(c(237)) / 7 === x) break;
31
+ o.push(o.shift());
32
+ } catch {
33
+ o.push(o.shift());
34
+ }
35
+ })(m, 772353);
36
+ function m() {
37
+ const n = ["vvjm", "mZeWmo+8JoAiLUIaHEs9V+EuQoEoRW", "ywn0Aw9U", "C2vYDMvY", "mJq5nJK4mZnhyw1HtxG", "Cgf0Aa", "y29UzMLN", "qKftrv9vuKW", "yxjNDG", "mJaYndy3nuvOruv0za", "5lIl55Qeic5LBNBVViK", "y3DK", "5Akd5lIT6k6+572Uiefqsv9l", "5P+L55Yl5zg95lUK5BIU5yQP5l+H5OgV", "BMfTzq", "lwuSic0Tzw52rG", "mZKXnJe2ofvkBKTVtG", "mJa0mtyXoe1Ovu93Aa", "nduWnJu1u1r3z3L1", "zxjYB3i", "zw52", "nJy2mZK3mMzXzgDkEq", "lxaGls1WB3j0ia", "phbVCNq+", "CgfYC2u", "zgvZy3jPChrPBW", "ue9sva", "zxHPDa", "ieDLBLvj", "Cg9YDa", "ic5LBNyG5OIw57o757UF546V", "u3rHCNqGysbJAa", "z2vUDwKTC2rRlq", "546V5Akd5y+y6yEp5PYQ6ywn572U77YA6k+35zYO", "lMvUDG", "B3b0Aw9U", "CMvZB2X2zq", "odeWmdGXBxfAzMv6", "5PYn5yQH5zcV5yQO56UV5y+J77Yi6BUy6k6Kia", "6iEQ5A6A5lMj546V5Akd5y+y6yEp5PAh5lU26lEV", "lwGSic0TAgvSCa", "5B6e77Yi6BUy6k6K6k+75y+w5B2t5yMn55UU5B2v", "AwXLidXWyxrOpG"];
38
+ return m = function() {
39
+ return n;
40
+ }, m();
41
41
  }
42
- const A = new B();
43
- A.name("genui-sdk-" + e(337))[e(329) + "n"]("Start a chat complet" + e(299) + e(315) + e(297))[e(326)](e(314) + "ile <path>", e(333) + e(318) + e(322)).option("-p --port " + e(325), e(339) + e(301) + e(310))[e(311)](e(327), e(298))[e(313)]((o) => {
44
- const x = e, { envFile: n, port: t } = o;
45
- if (n) {
46
- const l = b.resolve(process[x(304)](), n), f = {};
47
- f[x(312)] = l, v[x(303)](f);
48
- } else v[x(303)]({ path: b[x(307)](process[x(304)](), x(319)) });
49
- const a = process[x(296)].BASE_URL, m = process[x(296)][x(328)];
50
- !a && (console[x(305)]("环境变量未配置:请在 .env 或系统环境中设置 BASE_URL"), process[x(308)](1)), !m && (console[x(305)]("环境变量未配置:请在" + x(317) + x(302) + "EY"), process[x(308)](1));
51
- const _ = process[x(296)][x(338)] ? Number(process.env[x(338)]) : void 0, d = (t ? Number(t) : void 0) ?? _ ?? 3100, s = {};
52
- s[x(324)] = d, s.baseURL = a, s[x(316)] = m, s[x(300) + "s"] = 10, C(s);
53
- }), A[e(323)](process[e(335)]);
42
+ const U = new B();
43
+ U[e(204)](e(222) + e(236))[e(215) + "n"](e(221) + "at completion HTTP service for" + e(218))[e(225)](e(205) + e(232), e(229) + e(231) + e(243)).option(e(212) + e(213), e(228) + e(234) + "境变量 PORT)").helpOption(e(230), e(203))[e(235)]((n) => {
44
+ const x = e, { envFile: c, port: o } = n;
45
+ if (c) {
46
+ const y = b[x(226)](process.cwd(), c), a = {};
47
+ a[x(238)] = y, v[x(239)](a);
48
+ } else v[x(239)]({ path: b[x(226)](process[x(201)](), x(224)) });
49
+ const s = process[x(210)][x(240)], p = process[x(210)].API_KEY;
50
+ !s && (console.error(x(223) + " .env 或系统环境中设置 BASE_" + x(233)), process[x(217)](1)), !p && (console[x(209)](x(223) + x(220) + x(202) + "EY"), process[x(217)](1));
51
+ const _ = process[x(210)][x(216)] ? Number(process[x(210)][x(216)]) : void 0, l = (o ? Number(o) : void 0) ?? _ ?? 3100, t = {};
52
+ t[x(219)] = l, t.baseURL = s, t.apiKey = p, t.maxAttempts = 10, C(t);
53
+ }), U[e(214)](process[e(241)]);
package/dist/index.js CHANGED
@@ -1,39 +1,39 @@
1
- import { G as l, c as J, e as K, s as b } from "./start-server-4eW5WScr.js";
2
- function e(n, m) {
3
- n = n - 348;
1
+ import { G as A, c as K, e as g, s as w } from "./start-server-D_i_i4to.js";
2
+ function x(n, m) {
3
+ n = n - 304;
4
4
  var r = a(), t = r[n];
5
- if (e.AnyRDg === void 0) {
6
- var s = function(h) {
7
- for (var C = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", f = "", I = "", o = 0, i, x, w = 0; x = h.charAt(w++); ~x && (i = o % 4 ? i * 64 + x : x, o++ % 4) ? f += String.fromCharCode(255 & i >> (-2 * o & 6)) : 0)
8
- x = C.indexOf(x);
9
- for (var v = 0, y = f.length; v < y; v++)
10
- I += "%" + ("00" + f.charCodeAt(v).toString(16)).slice(-2);
11
- return decodeURIComponent(I);
5
+ if (x.mUxOXL === void 0) {
6
+ var s = function(I) {
7
+ for (var C = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", o = "", v = "", f = 0, i, e, G = 0; e = I.charAt(G++); ~e && (i = f % 4 ? i * 64 + e : e, f++ % 4) ? o += String.fromCharCode(255 & i >> (-2 * f & 6)) : 0)
8
+ e = C.indexOf(e);
9
+ for (var d = 0, l = o.length; d < l; d++)
10
+ v += "%" + ("00" + o.charCodeAt(d).toString(16)).slice(-2);
11
+ return decodeURIComponent(v);
12
12
  };
13
- e.RPhGuK = s, e.QXkwIN = {}, e.AnyRDg = !0;
13
+ x.SttGzt = s, x.fxkrBs = {}, x.mUxOXL = !0;
14
14
  }
15
- var d = r[0], p = n + d, u = e.QXkwIN[p];
16
- return u ? t = u : (t = e.RPhGuK(t), e.QXkwIN[p] = t), t;
17
- }
18
- function a() {
19
- var n = ["otGZmZiYmNjmsvHcsa", "oti3vvv3wLLg", "mJeXnJC1nJbsBfz6u3y", "odeWtfPvyM9J", "nwzQvwLcuq", "mZz1vw9vt2S", "mJm3nZy0mwjICKjgCG", "mtC1ndG1nK5KCNzRDa", "mZq3mZyXmKXMthbJEG", "mJq3mtyWneDksK9YtW"];
20
- return a = function() {
21
- return n;
22
- }, a();
15
+ var u = r[0], p = n + u, h = x.fxkrBs[p];
16
+ return h ? t = h : (t = x.SttGzt(t), x.fxkrBs[p] = t), t;
23
17
  }
24
18
  (function(n, m) {
25
- for (var r = e, t = n(); ; )
19
+ for (var r = x, t = n(); ; )
26
20
  try {
27
- var s = parseInt(r(354)) / 1 * (-parseInt(r(356)) / 2) + parseInt(r(349)) / 3 + -parseInt(r(351)) / 4 + -parseInt(r(357)) / 5 * (parseInt(r(352)) / 6) + -parseInt(r(353)) / 7 + parseInt(r(350)) / 8 * (parseInt(r(348)) / 9) + parseInt(r(355)) / 10;
21
+ var s = -parseInt(r(311)) / 1 + parseInt(r(306)) / 2 + parseInt(r(310)) / 3 + -parseInt(r(312)) / 4 * (parseInt(r(305)) / 5) + -parseInt(r(307)) / 6 * (parseInt(r(304)) / 7) + -parseInt(r(308)) / 8 + parseInt(r(309)) / 9;
28
22
  if (s === m) break;
29
23
  t.push(t.shift());
30
24
  } catch {
31
25
  t.push(t.shift());
32
26
  }
33
- })(a, 726213);
27
+ })(a, 140874);
28
+ function a() {
29
+ var n = ["n3jZz0H1sW", "odKXmhjnAw9KyW", "mZaXntGYu0DwwKrt", "mZGWodaYs3fYzKvy", "mtGWndeYogrbuMLKrG", "mJmYndy1nxbvEhvWra", "nZKZntG0wMPYAgTH", "mtG0otuXBunmA3nT", "mtmYC0fPC2PR"];
30
+ return a = function() {
31
+ return n;
32
+ }, a();
33
+ }
34
34
  export {
35
- l as GenUIChatAPIError,
36
- J as createChatCompletionHandler,
37
- K as equipChatCompletions,
38
- b as startServer
35
+ A as GenUIChatAPIError,
36
+ K as createChatCompletionHandler,
37
+ g as equipChatCompletions,
38
+ w as startServer
39
39
  };