@code0-tech/tucana 0.0.71 → 0.0.72
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/aquila.cjs.js +1 -1
- package/dist/aquila.es.js +221 -221
- package/dist/pb/_generated/velorum.generate_pb.d.ts +21 -4
- package/dist/pb/_generated/velorum.info_pb.d.ts +8 -4
- package/dist/{rpc-interceptor-CRhk15Dz.cjs → rpc-interceptor-DOeBkZHU.cjs} +1 -1
- package/dist/{rpc-interceptor-Bq56L_Jg.js → rpc-interceptor-az_TTCBK.js} +1 -1
- package/dist/sagittarius.cjs.js +1 -1
- package/dist/sagittarius.es.js +227 -227
- package/dist/shared.cjs.js +1 -1
- package/dist/shared.es.js +4 -4
- package/dist/shared.flow_pb-C4ewDq2u.js +957 -0
- package/dist/{shared.flow_pb-BNS2UoJj.cjs → shared.flow_pb-DrDw61IF.cjs} +1 -1
- package/dist/shared.function_pb-BErnwHWO.cjs +2 -0
- package/dist/{shared.function_pb-CMAwFz4S.js → shared.function_pb-e1jkWYE_.js} +430 -158
- package/dist/shared.runtime_usage_pb-CSRup69H.cjs +1 -0
- package/dist/shared.runtime_usage_pb-Hn8yNrjw.js +1779 -0
- package/dist/velorum.cjs.js +1 -1
- package/dist/velorum.es.js +206 -151
- package/package.json +1 -1
- package/dist/shared.flow_pb-BV09VLFs.js +0 -957
- package/dist/shared.function_pb-B9l5kdQt.cjs +0 -2
- package/dist/shared.runtime_usage_pb-BwOAdgPp.js +0 -2051
- package/dist/shared.runtime_usage_pb-CVahFg9u.cjs +0 -1
package/dist/velorum.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./shared.function_pb-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./shared.function_pb-BErnwHWO.cjs`),t=require(`./shared.flow_pb-DrDw61IF.cjs`),n=require(`./rpc-interceptor-DOeBkZHU.cjs`);var r=new class extends e.v{constructor(){super(`velorum.PromptRequest`,[{no:1,name:`prompt`,kind:`scalar`,T:9},{no:2,name:`project_id`,kind:`scalar`,T:3,L:0},{no:3,name:`model_identifier`,kind:`scalar`,T:9},{no:4,name:`functions`,kind:`message`,repeat:2,T:()=>e.t},{no:5,name:`data_types`,kind:`message`,repeat:2,T:()=>e.p},{no:6,name:`flow_types`,kind:`message`,repeat:2,T:()=>e.r}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.prompt=``,n.projectId=0n,n.modelIdentifier=``,n.functions=[],n.dataTypes=[],n.flowTypes=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.prompt=t.string();break;case 2:a.projectId=t.int64().toBigInt();break;case 3:a.modelIdentifier=t.string();break;case 4:a.functions.push(e.t.internalBinaryRead(t,t.uint32(),r));break;case 5:a.dataTypes.push(e.p.internalBinaryRead(t,t.uint32(),r));break;case 6:a.flowTypes.push(e.r.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.prompt!==``&&n.tag(1,e.C.LengthDelimited).string(t.prompt),t.projectId!==0n&&n.tag(2,e.C.Varint).int64(t.projectId),t.modelIdentifier!==``&&n.tag(3,e.C.LengthDelimited).string(t.modelIdentifier);for(let i=0;i<t.functions.length;i++)e.t.internalBinaryWrite(t.functions[i],n.tag(4,e.C.LengthDelimited).fork(),r).join();for(let i=0;i<t.dataTypes.length;i++)e.p.internalBinaryWrite(t.dataTypes[i],n.tag(5,e.C.LengthDelimited).fork(),r).join();for(let i=0;i<t.flowTypes.length;i++)e.r.internalBinaryWrite(t.flowTypes[i],n.tag(6,e.C.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},i=new class extends e.v{constructor(){super(`velorum.FlowRequest`,[{no:1,name:`prompt`,kind:`scalar`,T:9},{no:2,name:`flow`,kind:`message`,T:()=>t.a},{no:3,name:`project_id`,kind:`scalar`,T:3,L:0},{no:4,name:`model_identifier`,kind:`scalar`,T:9},{no:5,name:`functions`,kind:`message`,repeat:2,T:()=>e.t},{no:6,name:`data_types`,kind:`message`,repeat:2,T:()=>e.p},{no:7,name:`flow_types`,kind:`message`,repeat:2,T:()=>e.r}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.prompt=``,n.projectId=0n,n.modelIdentifier=``,n.functions=[],n.dataTypes=[],n.flowTypes=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(n,r,i,a){let o=a??this.create(),s=n.pos+r;for(;n.pos<s;){let[r,a]=n.tag();switch(r){case 1:o.prompt=n.string();break;case 2:o.flow=t.a.internalBinaryRead(n,n.uint32(),i,o.flow);break;case 3:o.projectId=n.int64().toBigInt();break;case 4:o.modelIdentifier=n.string();break;case 5:o.functions.push(e.t.internalBinaryRead(n,n.uint32(),i));break;case 6:o.dataTypes.push(e.p.internalBinaryRead(n,n.uint32(),i));break;case 7:o.flowTypes.push(e.r.internalBinaryRead(n,n.uint32(),i));break;default:let s=i.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);let c=n.skip(a);s!==!1&&(s===!0?e.S.onRead:s)(this.typeName,o,r,a,c)}}return o}internalBinaryWrite(n,r,i){n.prompt!==``&&r.tag(1,e.C.LengthDelimited).string(n.prompt),n.flow&&t.a.internalBinaryWrite(n.flow,r.tag(2,e.C.LengthDelimited).fork(),i).join(),n.projectId!==0n&&r.tag(3,e.C.Varint).int64(n.projectId),n.modelIdentifier!==``&&r.tag(4,e.C.LengthDelimited).string(n.modelIdentifier);for(let t=0;t<n.functions.length;t++)e.t.internalBinaryWrite(n.functions[t],r.tag(5,e.C.LengthDelimited).fork(),i).join();for(let t=0;t<n.dataTypes.length;t++)e.p.internalBinaryWrite(n.dataTypes[t],r.tag(6,e.C.LengthDelimited).fork(),i).join();for(let t=0;t<n.flowTypes.length;t++)e.r.internalBinaryWrite(n.flowTypes[t],r.tag(7,e.C.LengthDelimited).fork(),i).join();let a=i.writeUnknownFields;return a!==!1&&(a==1?e.S.onWrite:a)(this.typeName,n,r),r}},a=new class extends e.v{constructor(){super(`velorum.FlowResponse`,[{no:1,name:`flow`,kind:`message`,T:()=>t.a},{no:2,name:`cached_until`,kind:`scalar`,T:3,L:0},{no:3,name:`usage`,kind:`scalar`,T:3,L:0}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.cachedUntil=0n,n.usage=0n,t!==void 0&&e.y(this,n,t),n}internalBinaryRead(n,r,i,a){let o=a??this.create(),s=n.pos+r;for(;n.pos<s;){let[r,a]=n.tag();switch(r){case 1:o.flow=t.a.internalBinaryRead(n,n.uint32(),i,o.flow);break;case 2:o.cachedUntil=n.int64().toBigInt();break;case 3:o.usage=n.int64().toBigInt();break;default:let s=i.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);let c=n.skip(a);s!==!1&&(s===!0?e.S.onRead:s)(this.typeName,o,r,a,c)}}return o}internalBinaryWrite(n,r,i){n.flow&&t.a.internalBinaryWrite(n.flow,r.tag(1,e.C.LengthDelimited).fork(),i).join(),n.cachedUntil!==0n&&r.tag(2,e.C.Varint).int64(n.cachedUntil),n.usage!==0n&&r.tag(3,e.C.Varint).int64(n.usage);let a=i.writeUnknownFields;return a!==!1&&(a==1?e.S.onWrite:a)(this.typeName,n,r),r}},o=new n.n(`velorum.GenerateService`,[{name:`Prompt`,options:{},I:r,O:a},{name:`Flow`,options:{},I:i,O:a}]),s=class{constructor(e){this._transport=e,this.typeName=o.typeName,this.methods=o.methods,this.options=o.options}prompt(e,t){let r=this.methods[0],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}flow(e,t){let r=this.methods[1],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}},c=function(e){return e[e.UNKNOWN=0]=`UNKNOWN`,e[e.EXPLAIN=1]=`EXPLAIN`,e[e.GENERATE=2]=`GENERATE`,e}({}),l=new class extends e.v{constructor(){super(`velorum.ModelsRequest`,[])}create(t){let n=globalThis.Object.create(this.messagePrototype);return t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},u=new class extends e.v{constructor(){super(`velorum.Model`,[{no:1,name:`identifier`,kind:`scalar`,T:9},{no:2,name:`name`,kind:`scalar`,T:9},{no:3,name:`token_cost`,kind:`scalar`,T:2},{no:4,name:`type`,kind:`enum`,repeat:1,T:()=>[`velorum.Model.ModelType`,c]}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.identifier=``,n.name=``,n.tokenCost=0,n.type=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.identifier=t.string();break;case 2:a.name=t.string();break;case 3:a.tokenCost=t.float();break;case 4:if(i===e.C.LengthDelimited)for(let e=t.int32()+t.pos;t.pos<e;)a.type.push(t.int32());else a.type.push(t.int32());break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){if(t.identifier!==``&&n.tag(1,e.C.LengthDelimited).string(t.identifier),t.name!==``&&n.tag(2,e.C.LengthDelimited).string(t.name),t.tokenCost!==0&&n.tag(3,e.C.Bit32).float(t.tokenCost),t.type.length){n.tag(4,e.C.LengthDelimited).fork();for(let e=0;e<t.type.length;e++)n.int32(t.type[e]);n.join()}let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},d=new class extends e.v{constructor(){super(`velorum.ModelsResponse`,[{no:1,name:`models`,kind:`message`,repeat:2,T:()=>u}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.models=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.models.push(u.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){for(let i=0;i<t.models.length;i++)u.internalBinaryWrite(t.models[i],n.tag(1,e.C.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},f=new n.n(`velorum.InfoService`,[{name:`Models`,options:{},I:l,O:d}]),p=class{constructor(e){this._transport=e,this.typeName=f.typeName,this.methods=f.methods,this.options=f.options}models(e,t){let r=this.methods[0],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}};exports.FlowRequest=i,exports.FlowResponse=a,exports.GenerateService=o,exports.GenerateServiceClient=s,exports.InfoService=f,exports.InfoServiceClient=p,exports.Model=u,exports.Model_ModelType=c,exports.ModelsRequest=l,exports.ModelsResponse=d,exports.PromptRequest=r;
|
package/dist/velorum.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as
|
|
4
|
-
var
|
|
1
|
+
import { C as e, S as t, p as n, r, t as i, v as a, y as o } from "./shared.function_pb-e1jkWYE_.js";
|
|
2
|
+
import { a as s } from "./shared.flow_pb-C4ewDq2u.js";
|
|
3
|
+
import { n as c, t as l } from "./rpc-interceptor-az_TTCBK.js";
|
|
4
|
+
var u = new class extends a {
|
|
5
5
|
constructor() {
|
|
6
6
|
super("velorum.PromptRequest", [
|
|
7
7
|
{
|
|
@@ -19,58 +19,78 @@ var l = new class extends n {
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
no: 3,
|
|
22
|
+
name: "model_identifier",
|
|
23
|
+
kind: "scalar",
|
|
24
|
+
T: 9
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
no: 4,
|
|
22
28
|
name: "functions",
|
|
23
29
|
kind: "message",
|
|
24
30
|
repeat: 2,
|
|
25
|
-
T: () =>
|
|
31
|
+
T: () => i
|
|
26
32
|
},
|
|
27
33
|
{
|
|
28
|
-
no:
|
|
34
|
+
no: 5,
|
|
29
35
|
name: "data_types",
|
|
30
36
|
kind: "message",
|
|
31
37
|
repeat: 2,
|
|
32
|
-
T: () =>
|
|
38
|
+
T: () => n
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
no: 6,
|
|
42
|
+
name: "flow_types",
|
|
43
|
+
kind: "message",
|
|
44
|
+
repeat: 2,
|
|
45
|
+
T: () => r
|
|
33
46
|
}
|
|
34
47
|
]);
|
|
35
48
|
}
|
|
36
49
|
create(e) {
|
|
37
|
-
let
|
|
38
|
-
return
|
|
50
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
51
|
+
return t.prompt = "", t.projectId = 0n, t.modelIdentifier = "", t.functions = [], t.dataTypes = [], t.flowTypes = [], e !== void 0 && o(this, t, e), t;
|
|
39
52
|
}
|
|
40
|
-
internalBinaryRead(e,
|
|
41
|
-
let
|
|
42
|
-
for (; e.pos <
|
|
43
|
-
let [
|
|
44
|
-
switch (
|
|
53
|
+
internalBinaryRead(e, a, o, s) {
|
|
54
|
+
let c = s ?? this.create(), l = e.pos + a;
|
|
55
|
+
for (; e.pos < l;) {
|
|
56
|
+
let [a, s] = e.tag();
|
|
57
|
+
switch (a) {
|
|
45
58
|
case 1:
|
|
46
|
-
|
|
59
|
+
c.prompt = e.string();
|
|
47
60
|
break;
|
|
48
61
|
case 2:
|
|
49
|
-
|
|
62
|
+
c.projectId = e.int64().toBigInt();
|
|
50
63
|
break;
|
|
51
64
|
case 3:
|
|
52
|
-
|
|
65
|
+
c.modelIdentifier = e.string();
|
|
53
66
|
break;
|
|
54
67
|
case 4:
|
|
55
|
-
|
|
68
|
+
c.functions.push(i.internalBinaryRead(e, e.uint32(), o));
|
|
69
|
+
break;
|
|
70
|
+
case 5:
|
|
71
|
+
c.dataTypes.push(n.internalBinaryRead(e, e.uint32(), o));
|
|
72
|
+
break;
|
|
73
|
+
case 6:
|
|
74
|
+
c.flowTypes.push(r.internalBinaryRead(e, e.uint32(), o));
|
|
56
75
|
break;
|
|
57
76
|
default:
|
|
58
|
-
let
|
|
59
|
-
if (
|
|
60
|
-
let
|
|
61
|
-
|
|
77
|
+
let l = o.readUnknownField;
|
|
78
|
+
if (l === "throw") throw new globalThis.Error(`Unknown field ${a} (wire type ${s}) for ${this.typeName}`);
|
|
79
|
+
let u = e.skip(s);
|
|
80
|
+
l !== !1 && (l === !0 ? t.onRead : l)(this.typeName, c, a, s, u);
|
|
62
81
|
}
|
|
63
82
|
}
|
|
64
|
-
return
|
|
83
|
+
return c;
|
|
65
84
|
}
|
|
66
|
-
internalBinaryWrite(
|
|
67
|
-
|
|
68
|
-
for (let
|
|
69
|
-
for (let
|
|
70
|
-
let
|
|
71
|
-
|
|
85
|
+
internalBinaryWrite(a, o, s) {
|
|
86
|
+
a.prompt !== "" && o.tag(1, e.LengthDelimited).string(a.prompt), a.projectId !== 0n && o.tag(2, e.Varint).int64(a.projectId), a.modelIdentifier !== "" && o.tag(3, e.LengthDelimited).string(a.modelIdentifier);
|
|
87
|
+
for (let t = 0; t < a.functions.length; t++) i.internalBinaryWrite(a.functions[t], o.tag(4, e.LengthDelimited).fork(), s).join();
|
|
88
|
+
for (let t = 0; t < a.dataTypes.length; t++) n.internalBinaryWrite(a.dataTypes[t], o.tag(5, e.LengthDelimited).fork(), s).join();
|
|
89
|
+
for (let t = 0; t < a.flowTypes.length; t++) r.internalBinaryWrite(a.flowTypes[t], o.tag(6, e.LengthDelimited).fork(), s).join();
|
|
90
|
+
let c = s.writeUnknownFields;
|
|
91
|
+
return c !== !1 && (c == 1 ? t.onWrite : c)(this.typeName, a, o), o;
|
|
72
92
|
}
|
|
73
|
-
}(),
|
|
93
|
+
}(), d = new class extends a {
|
|
74
94
|
constructor() {
|
|
75
95
|
super("velorum.FlowRequest", [
|
|
76
96
|
{
|
|
@@ -83,7 +103,7 @@ var l = new class extends n {
|
|
|
83
103
|
no: 2,
|
|
84
104
|
name: "flow",
|
|
85
105
|
kind: "message",
|
|
86
|
-
T: () =>
|
|
106
|
+
T: () => s
|
|
87
107
|
},
|
|
88
108
|
{
|
|
89
109
|
no: 3,
|
|
@@ -94,68 +114,88 @@ var l = new class extends n {
|
|
|
94
114
|
},
|
|
95
115
|
{
|
|
96
116
|
no: 4,
|
|
117
|
+
name: "model_identifier",
|
|
118
|
+
kind: "scalar",
|
|
119
|
+
T: 9
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
no: 5,
|
|
97
123
|
name: "functions",
|
|
98
124
|
kind: "message",
|
|
99
125
|
repeat: 2,
|
|
100
|
-
T: () =>
|
|
126
|
+
T: () => i
|
|
101
127
|
},
|
|
102
128
|
{
|
|
103
|
-
no:
|
|
129
|
+
no: 6,
|
|
104
130
|
name: "data_types",
|
|
105
131
|
kind: "message",
|
|
106
132
|
repeat: 2,
|
|
107
|
-
T: () =>
|
|
133
|
+
T: () => n
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
no: 7,
|
|
137
|
+
name: "flow_types",
|
|
138
|
+
kind: "message",
|
|
139
|
+
repeat: 2,
|
|
140
|
+
T: () => r
|
|
108
141
|
}
|
|
109
142
|
]);
|
|
110
143
|
}
|
|
111
144
|
create(e) {
|
|
112
|
-
let
|
|
113
|
-
return
|
|
145
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
146
|
+
return t.prompt = "", t.projectId = 0n, t.modelIdentifier = "", t.functions = [], t.dataTypes = [], t.flowTypes = [], e !== void 0 && o(this, t, e), t;
|
|
114
147
|
}
|
|
115
|
-
internalBinaryRead(e,
|
|
116
|
-
let
|
|
117
|
-
for (; e.pos <
|
|
118
|
-
let [
|
|
119
|
-
switch (
|
|
148
|
+
internalBinaryRead(e, a, o, c) {
|
|
149
|
+
let l = c ?? this.create(), u = e.pos + a;
|
|
150
|
+
for (; e.pos < u;) {
|
|
151
|
+
let [a, c] = e.tag();
|
|
152
|
+
switch (a) {
|
|
120
153
|
case 1:
|
|
121
|
-
|
|
154
|
+
l.prompt = e.string();
|
|
122
155
|
break;
|
|
123
156
|
case 2:
|
|
124
|
-
|
|
157
|
+
l.flow = s.internalBinaryRead(e, e.uint32(), o, l.flow);
|
|
125
158
|
break;
|
|
126
159
|
case 3:
|
|
127
|
-
|
|
160
|
+
l.projectId = e.int64().toBigInt();
|
|
128
161
|
break;
|
|
129
162
|
case 4:
|
|
130
|
-
|
|
163
|
+
l.modelIdentifier = e.string();
|
|
131
164
|
break;
|
|
132
165
|
case 5:
|
|
133
|
-
|
|
166
|
+
l.functions.push(i.internalBinaryRead(e, e.uint32(), o));
|
|
167
|
+
break;
|
|
168
|
+
case 6:
|
|
169
|
+
l.dataTypes.push(n.internalBinaryRead(e, e.uint32(), o));
|
|
170
|
+
break;
|
|
171
|
+
case 7:
|
|
172
|
+
l.flowTypes.push(r.internalBinaryRead(e, e.uint32(), o));
|
|
134
173
|
break;
|
|
135
174
|
default:
|
|
136
|
-
let
|
|
137
|
-
if (
|
|
138
|
-
let
|
|
139
|
-
|
|
175
|
+
let u = o.readUnknownField;
|
|
176
|
+
if (u === "throw") throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
177
|
+
let d = e.skip(c);
|
|
178
|
+
u !== !1 && (u === !0 ? t.onRead : u)(this.typeName, l, a, c, d);
|
|
140
179
|
}
|
|
141
180
|
}
|
|
142
|
-
return
|
|
181
|
+
return l;
|
|
143
182
|
}
|
|
144
|
-
internalBinaryWrite(
|
|
145
|
-
|
|
146
|
-
for (let
|
|
147
|
-
for (let
|
|
148
|
-
let
|
|
149
|
-
|
|
183
|
+
internalBinaryWrite(a, o, c) {
|
|
184
|
+
a.prompt !== "" && o.tag(1, e.LengthDelimited).string(a.prompt), a.flow && s.internalBinaryWrite(a.flow, o.tag(2, e.LengthDelimited).fork(), c).join(), a.projectId !== 0n && o.tag(3, e.Varint).int64(a.projectId), a.modelIdentifier !== "" && o.tag(4, e.LengthDelimited).string(a.modelIdentifier);
|
|
185
|
+
for (let t = 0; t < a.functions.length; t++) i.internalBinaryWrite(a.functions[t], o.tag(5, e.LengthDelimited).fork(), c).join();
|
|
186
|
+
for (let t = 0; t < a.dataTypes.length; t++) n.internalBinaryWrite(a.dataTypes[t], o.tag(6, e.LengthDelimited).fork(), c).join();
|
|
187
|
+
for (let t = 0; t < a.flowTypes.length; t++) r.internalBinaryWrite(a.flowTypes[t], o.tag(7, e.LengthDelimited).fork(), c).join();
|
|
188
|
+
let l = c.writeUnknownFields;
|
|
189
|
+
return l !== !1 && (l == 1 ? t.onWrite : l)(this.typeName, a, o), o;
|
|
150
190
|
}
|
|
151
|
-
}(),
|
|
191
|
+
}(), f = new class extends a {
|
|
152
192
|
constructor() {
|
|
153
193
|
super("velorum.FlowResponse", [
|
|
154
194
|
{
|
|
155
195
|
no: 1,
|
|
156
196
|
name: "flow",
|
|
157
197
|
kind: "message",
|
|
158
|
-
T: () =>
|
|
198
|
+
T: () => s
|
|
159
199
|
},
|
|
160
200
|
{
|
|
161
201
|
no: 2,
|
|
@@ -174,191 +214,206 @@ var l = new class extends n {
|
|
|
174
214
|
]);
|
|
175
215
|
}
|
|
176
216
|
create(e) {
|
|
177
|
-
let
|
|
178
|
-
return
|
|
217
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
218
|
+
return t.cachedUntil = 0n, t.usage = 0n, e !== void 0 && o(this, t, e), t;
|
|
179
219
|
}
|
|
180
|
-
internalBinaryRead(e,
|
|
181
|
-
let
|
|
182
|
-
for (; e.pos <
|
|
183
|
-
let [
|
|
184
|
-
switch (
|
|
220
|
+
internalBinaryRead(e, n, r, i) {
|
|
221
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
222
|
+
for (; e.pos < o;) {
|
|
223
|
+
let [n, i] = e.tag();
|
|
224
|
+
switch (n) {
|
|
185
225
|
case 1:
|
|
186
|
-
|
|
226
|
+
a.flow = s.internalBinaryRead(e, e.uint32(), r, a.flow);
|
|
187
227
|
break;
|
|
188
228
|
case 2:
|
|
189
|
-
|
|
229
|
+
a.cachedUntil = e.int64().toBigInt();
|
|
190
230
|
break;
|
|
191
231
|
case 3:
|
|
192
|
-
|
|
232
|
+
a.usage = e.int64().toBigInt();
|
|
193
233
|
break;
|
|
194
234
|
default:
|
|
195
|
-
let
|
|
196
|
-
if (
|
|
197
|
-
let c = e.skip(
|
|
198
|
-
|
|
235
|
+
let o = r.readUnknownField;
|
|
236
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
237
|
+
let c = e.skip(i);
|
|
238
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, c);
|
|
199
239
|
}
|
|
200
240
|
}
|
|
201
|
-
return
|
|
241
|
+
return a;
|
|
202
242
|
}
|
|
203
|
-
internalBinaryWrite(
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
return
|
|
243
|
+
internalBinaryWrite(n, r, i) {
|
|
244
|
+
n.flow && s.internalBinaryWrite(n.flow, r.tag(1, e.LengthDelimited).fork(), i).join(), n.cachedUntil !== 0n && r.tag(2, e.Varint).int64(n.cachedUntil), n.usage !== 0n && r.tag(3, e.Varint).int64(n.usage);
|
|
245
|
+
let a = i.writeUnknownFields;
|
|
246
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
207
247
|
}
|
|
208
|
-
}(),
|
|
248
|
+
}(), p = new c("velorum.GenerateService", [{
|
|
209
249
|
name: "Prompt",
|
|
210
250
|
options: {},
|
|
211
|
-
I:
|
|
212
|
-
O:
|
|
251
|
+
I: u,
|
|
252
|
+
O: f
|
|
213
253
|
}, {
|
|
214
254
|
name: "Flow",
|
|
215
255
|
options: {},
|
|
216
|
-
I:
|
|
217
|
-
O:
|
|
218
|
-
}]),
|
|
256
|
+
I: d,
|
|
257
|
+
O: f
|
|
258
|
+
}]), m = class {
|
|
219
259
|
constructor(e) {
|
|
220
|
-
this._transport = e, this.typeName =
|
|
260
|
+
this._transport = e, this.typeName = p.typeName, this.methods = p.methods, this.options = p.options;
|
|
221
261
|
}
|
|
222
262
|
prompt(e, t) {
|
|
223
263
|
let n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
224
|
-
return
|
|
264
|
+
return l("unary", this._transport, n, r, e);
|
|
225
265
|
}
|
|
226
266
|
flow(e, t) {
|
|
227
267
|
let n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
228
|
-
return
|
|
268
|
+
return l("unary", this._transport, n, r, e);
|
|
229
269
|
}
|
|
230
|
-
},
|
|
270
|
+
}, h = /* @__PURE__ */ function(e) {
|
|
231
271
|
return e[e.UNKNOWN = 0] = "UNKNOWN", e[e.EXPLAIN = 1] = "EXPLAIN", e[e.GENERATE = 2] = "GENERATE", e;
|
|
232
|
-
}({}),
|
|
272
|
+
}({}), g = new class extends a {
|
|
233
273
|
constructor() {
|
|
234
274
|
super("velorum.ModelsRequest", []);
|
|
235
275
|
}
|
|
236
276
|
create(e) {
|
|
237
|
-
let
|
|
238
|
-
return e !== void 0 &&
|
|
277
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
278
|
+
return e !== void 0 && o(this, t, e), t;
|
|
239
279
|
}
|
|
240
|
-
internalBinaryRead(e,
|
|
241
|
-
let
|
|
280
|
+
internalBinaryRead(e, n, r, i) {
|
|
281
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
242
282
|
for (; e.pos < o;) {
|
|
243
|
-
let [
|
|
244
|
-
switch (
|
|
283
|
+
let [n, i] = e.tag();
|
|
284
|
+
switch (n) {
|
|
245
285
|
default:
|
|
246
|
-
let o =
|
|
247
|
-
if (o === "throw") throw new globalThis.Error(`Unknown field ${
|
|
248
|
-
let s = e.skip(
|
|
249
|
-
o !== !1 && (o === !0 ?
|
|
286
|
+
let o = r.readUnknownField;
|
|
287
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
288
|
+
let s = e.skip(i);
|
|
289
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, s);
|
|
250
290
|
}
|
|
251
291
|
}
|
|
252
|
-
return
|
|
292
|
+
return a;
|
|
253
293
|
}
|
|
254
|
-
internalBinaryWrite(e,
|
|
255
|
-
let
|
|
256
|
-
return
|
|
294
|
+
internalBinaryWrite(e, n, r) {
|
|
295
|
+
let i = r.writeUnknownFields;
|
|
296
|
+
return i !== !1 && (i == 1 ? t.onWrite : i)(this.typeName, e, n), n;
|
|
257
297
|
}
|
|
258
|
-
}(),
|
|
298
|
+
}(), _ = new class extends a {
|
|
259
299
|
constructor() {
|
|
260
300
|
super("velorum.Model", [
|
|
261
301
|
{
|
|
262
302
|
no: 1,
|
|
263
|
-
name: "
|
|
303
|
+
name: "identifier",
|
|
264
304
|
kind: "scalar",
|
|
265
305
|
T: 9
|
|
266
306
|
},
|
|
267
307
|
{
|
|
268
308
|
no: 2,
|
|
309
|
+
name: "name",
|
|
310
|
+
kind: "scalar",
|
|
311
|
+
T: 9
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
no: 3,
|
|
269
315
|
name: "token_cost",
|
|
270
316
|
kind: "scalar",
|
|
271
317
|
T: 2
|
|
272
318
|
},
|
|
273
319
|
{
|
|
274
|
-
no:
|
|
320
|
+
no: 4,
|
|
275
321
|
name: "type",
|
|
276
322
|
kind: "enum",
|
|
277
|
-
|
|
323
|
+
repeat: 1,
|
|
324
|
+
T: () => ["velorum.Model.ModelType", h]
|
|
278
325
|
}
|
|
279
326
|
]);
|
|
280
327
|
}
|
|
281
328
|
create(e) {
|
|
282
|
-
let
|
|
283
|
-
return
|
|
329
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
330
|
+
return t.identifier = "", t.name = "", t.tokenCost = 0, t.type = [], e !== void 0 && o(this, t, e), t;
|
|
284
331
|
}
|
|
285
|
-
internalBinaryRead(
|
|
286
|
-
let
|
|
287
|
-
for (;
|
|
288
|
-
let [
|
|
289
|
-
switch (
|
|
332
|
+
internalBinaryRead(n, r, i, a) {
|
|
333
|
+
let o = a ?? this.create(), s = n.pos + r;
|
|
334
|
+
for (; n.pos < s;) {
|
|
335
|
+
let [r, a] = n.tag();
|
|
336
|
+
switch (r) {
|
|
290
337
|
case 1:
|
|
291
|
-
|
|
338
|
+
o.identifier = n.string();
|
|
292
339
|
break;
|
|
293
340
|
case 2:
|
|
294
|
-
|
|
341
|
+
o.name = n.string();
|
|
295
342
|
break;
|
|
296
343
|
case 3:
|
|
297
|
-
|
|
344
|
+
o.tokenCost = n.float();
|
|
345
|
+
break;
|
|
346
|
+
case 4:
|
|
347
|
+
if (a === e.LengthDelimited) for (let e = n.int32() + n.pos; n.pos < e;) o.type.push(n.int32());
|
|
348
|
+
else o.type.push(n.int32());
|
|
298
349
|
break;
|
|
299
350
|
default:
|
|
300
|
-
let
|
|
301
|
-
if (
|
|
302
|
-
let
|
|
303
|
-
|
|
351
|
+
let s = i.readUnknownField;
|
|
352
|
+
if (s === "throw") throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);
|
|
353
|
+
let c = n.skip(a);
|
|
354
|
+
s !== !1 && (s === !0 ? t.onRead : s)(this.typeName, o, r, a, c);
|
|
304
355
|
}
|
|
305
356
|
}
|
|
306
|
-
return
|
|
357
|
+
return o;
|
|
307
358
|
}
|
|
308
|
-
internalBinaryWrite(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
359
|
+
internalBinaryWrite(n, r, i) {
|
|
360
|
+
if (n.identifier !== "" && r.tag(1, e.LengthDelimited).string(n.identifier), n.name !== "" && r.tag(2, e.LengthDelimited).string(n.name), n.tokenCost !== 0 && r.tag(3, e.Bit32).float(n.tokenCost), n.type.length) {
|
|
361
|
+
r.tag(4, e.LengthDelimited).fork();
|
|
362
|
+
for (let e = 0; e < n.type.length; e++) r.int32(n.type[e]);
|
|
363
|
+
r.join();
|
|
364
|
+
}
|
|
365
|
+
let a = i.writeUnknownFields;
|
|
366
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
312
367
|
}
|
|
313
|
-
}(),
|
|
368
|
+
}(), v = new class extends a {
|
|
314
369
|
constructor() {
|
|
315
370
|
super("velorum.ModelsResponse", [{
|
|
316
371
|
no: 1,
|
|
317
372
|
name: "models",
|
|
318
373
|
kind: "message",
|
|
319
374
|
repeat: 2,
|
|
320
|
-
T: () =>
|
|
375
|
+
T: () => _
|
|
321
376
|
}]);
|
|
322
377
|
}
|
|
323
378
|
create(e) {
|
|
324
|
-
let
|
|
325
|
-
return
|
|
379
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
380
|
+
return t.models = [], e !== void 0 && o(this, t, e), t;
|
|
326
381
|
}
|
|
327
|
-
internalBinaryRead(e,
|
|
328
|
-
let
|
|
382
|
+
internalBinaryRead(e, n, r, i) {
|
|
383
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
329
384
|
for (; e.pos < o;) {
|
|
330
|
-
let [
|
|
331
|
-
switch (
|
|
385
|
+
let [n, i] = e.tag();
|
|
386
|
+
switch (n) {
|
|
332
387
|
case 1:
|
|
333
|
-
|
|
388
|
+
a.models.push(_.internalBinaryRead(e, e.uint32(), r));
|
|
334
389
|
break;
|
|
335
390
|
default:
|
|
336
|
-
let o =
|
|
337
|
-
if (o === "throw") throw new globalThis.Error(`Unknown field ${
|
|
338
|
-
let s = e.skip(
|
|
339
|
-
o !== !1 && (o === !0 ?
|
|
391
|
+
let o = r.readUnknownField;
|
|
392
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
393
|
+
let s = e.skip(i);
|
|
394
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, s);
|
|
340
395
|
}
|
|
341
396
|
}
|
|
342
|
-
return
|
|
397
|
+
return a;
|
|
343
398
|
}
|
|
344
|
-
internalBinaryWrite(
|
|
345
|
-
for (let
|
|
346
|
-
let
|
|
347
|
-
return
|
|
399
|
+
internalBinaryWrite(n, r, i) {
|
|
400
|
+
for (let t = 0; t < n.models.length; t++) _.internalBinaryWrite(n.models[t], r.tag(1, e.LengthDelimited).fork(), i).join();
|
|
401
|
+
let a = i.writeUnknownFields;
|
|
402
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
348
403
|
}
|
|
349
|
-
}(),
|
|
404
|
+
}(), y = new c("velorum.InfoService", [{
|
|
350
405
|
name: "Models",
|
|
351
406
|
options: {},
|
|
352
|
-
I:
|
|
353
|
-
O:
|
|
354
|
-
}]),
|
|
407
|
+
I: g,
|
|
408
|
+
O: v
|
|
409
|
+
}]), b = class {
|
|
355
410
|
constructor(e) {
|
|
356
|
-
this._transport = e, this.typeName =
|
|
411
|
+
this._transport = e, this.typeName = y.typeName, this.methods = y.methods, this.options = y.options;
|
|
357
412
|
}
|
|
358
413
|
models(e, t) {
|
|
359
414
|
let n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
360
|
-
return
|
|
415
|
+
return l("unary", this._transport, n, r, e);
|
|
361
416
|
}
|
|
362
417
|
};
|
|
363
418
|
//#endregion
|
|
364
|
-
export {
|
|
419
|
+
export { d as FlowRequest, f as FlowResponse, p as GenerateService, m as GenerateServiceClient, y as InfoService, b as InfoServiceClient, _ as Model, h as Model_ModelType, g as ModelsRequest, v as ModelsResponse, u as PromptRequest };
|