@casual-simulation/aux-records 4.2.6-alpha.27836606827 → 4.2.6
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/ComIdConfig.d.ts +6 -0
- package/ConfigurationStore.d.ts +6 -0
- package/GoogleAIChatInterface.js +33 -29
- package/GoogleAIChatInterface.js.map +1 -1
- package/README.md +1 -1
- package/RecordsServer.d.ts +4 -0
- package/ServerConfig.d.ts +6 -0
- package/package.json +3 -3
package/ComIdConfig.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const COM_ID_PLAYER_CONFIG: z.ZodObject<{
|
|
|
21
21
|
"static inst": "static inst";
|
|
22
22
|
"local inst": "local inst";
|
|
23
23
|
"public inst": "public inst";
|
|
24
|
+
public: "public";
|
|
24
25
|
"free inst": "free inst";
|
|
25
26
|
free: "free";
|
|
26
27
|
"private inst": "private inst";
|
|
@@ -40,6 +41,7 @@ export declare const COM_ID_PLAYER_CONFIG: z.ZodObject<{
|
|
|
40
41
|
"static inst": "static inst";
|
|
41
42
|
"local inst": "local inst";
|
|
42
43
|
"public inst": "public inst";
|
|
44
|
+
public: "public";
|
|
43
45
|
"free inst": "free inst";
|
|
44
46
|
free: "free";
|
|
45
47
|
"private inst": "private inst";
|
|
@@ -59,6 +61,7 @@ export declare const COM_ID_PLAYER_CONFIG: z.ZodObject<{
|
|
|
59
61
|
"static inst": "static inst";
|
|
60
62
|
"local inst": "local inst";
|
|
61
63
|
"public inst": "public inst";
|
|
64
|
+
public: "public";
|
|
62
65
|
"free inst": "free inst";
|
|
63
66
|
free: "free";
|
|
64
67
|
"private inst": "private inst";
|
|
@@ -94,6 +97,7 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
94
97
|
"static inst": "static inst";
|
|
95
98
|
"local inst": "local inst";
|
|
96
99
|
"public inst": "public inst";
|
|
100
|
+
public: "public";
|
|
97
101
|
"free inst": "free inst";
|
|
98
102
|
free: "free";
|
|
99
103
|
"private inst": "private inst";
|
|
@@ -113,6 +117,7 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
113
117
|
"static inst": "static inst";
|
|
114
118
|
"local inst": "local inst";
|
|
115
119
|
"public inst": "public inst";
|
|
120
|
+
public: "public";
|
|
116
121
|
"free inst": "free inst";
|
|
117
122
|
free: "free";
|
|
118
123
|
"private inst": "private inst";
|
|
@@ -132,6 +137,7 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
132
137
|
"static inst": "static inst";
|
|
133
138
|
"local inst": "local inst";
|
|
134
139
|
"public inst": "public inst";
|
|
140
|
+
public: "public";
|
|
135
141
|
"free inst": "free inst";
|
|
136
142
|
free: "free";
|
|
137
143
|
"private inst": "private inst";
|
package/ConfigurationStore.d.ts
CHANGED
|
@@ -658,6 +658,7 @@ export declare const CONFIGURATION_SCHEMAS: ({
|
|
|
658
658
|
"static inst": "static inst";
|
|
659
659
|
"local inst": "local inst";
|
|
660
660
|
"public inst": "public inst";
|
|
661
|
+
public: "public";
|
|
661
662
|
"free inst": "free inst";
|
|
662
663
|
free: "free";
|
|
663
664
|
"private inst": "private inst";
|
|
@@ -677,6 +678,7 @@ export declare const CONFIGURATION_SCHEMAS: ({
|
|
|
677
678
|
"static inst": "static inst";
|
|
678
679
|
"local inst": "local inst";
|
|
679
680
|
"public inst": "public inst";
|
|
681
|
+
public: "public";
|
|
680
682
|
"free inst": "free inst";
|
|
681
683
|
free: "free";
|
|
682
684
|
"private inst": "private inst";
|
|
@@ -696,6 +698,7 @@ export declare const CONFIGURATION_SCHEMAS: ({
|
|
|
696
698
|
"static inst": "static inst";
|
|
697
699
|
"local inst": "local inst";
|
|
698
700
|
"public inst": "public inst";
|
|
701
|
+
public: "public";
|
|
699
702
|
"free inst": "free inst";
|
|
700
703
|
free: "free";
|
|
701
704
|
"private inst": "private inst";
|
|
@@ -1369,6 +1372,7 @@ export declare const CONFIGURATION_SCHEMAS_MAP: {
|
|
|
1369
1372
|
"static inst": "static inst";
|
|
1370
1373
|
"local inst": "local inst";
|
|
1371
1374
|
"public inst": "public inst";
|
|
1375
|
+
public: "public";
|
|
1372
1376
|
"free inst": "free inst";
|
|
1373
1377
|
free: "free";
|
|
1374
1378
|
"private inst": "private inst";
|
|
@@ -1388,6 +1392,7 @@ export declare const CONFIGURATION_SCHEMAS_MAP: {
|
|
|
1388
1392
|
"static inst": "static inst";
|
|
1389
1393
|
"local inst": "local inst";
|
|
1390
1394
|
"public inst": "public inst";
|
|
1395
|
+
public: "public";
|
|
1391
1396
|
"free inst": "free inst";
|
|
1392
1397
|
free: "free";
|
|
1393
1398
|
"private inst": "private inst";
|
|
@@ -1407,6 +1412,7 @@ export declare const CONFIGURATION_SCHEMAS_MAP: {
|
|
|
1407
1412
|
"static inst": "static inst";
|
|
1408
1413
|
"local inst": "local inst";
|
|
1409
1414
|
"public inst": "public inst";
|
|
1415
|
+
public: "public";
|
|
1410
1416
|
"free inst": "free inst";
|
|
1411
1417
|
free: "free";
|
|
1412
1418
|
"private inst": "private inst";
|
package/GoogleAIChatInterface.js
CHANGED
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { GoogleGenAI } from '@google/genai';
|
|
8
8
|
import { traced } from './tracing/TracingDecorators';
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from '@opentelemetry/api';
|
|
10
10
|
const TRACE_NAME = 'GoogleAIChatInterface';
|
|
@@ -21,13 +21,10 @@ const SPAN_OPTIONS = {
|
|
|
21
21
|
export class GoogleAIChatInterface {
|
|
22
22
|
constructor(options) {
|
|
23
23
|
this._options = options;
|
|
24
|
-
this._genAI = new
|
|
24
|
+
this._genAI = new GoogleGenAI({ apiKey: options.apiKey });
|
|
25
25
|
}
|
|
26
26
|
async chat(request) {
|
|
27
27
|
try {
|
|
28
|
-
const model = this._genAI.getGenerativeModel({
|
|
29
|
-
model: request.model,
|
|
30
|
-
});
|
|
31
28
|
const messages = request.messages.map((m) => mapMessage(m));
|
|
32
29
|
const historyMessages = messages.slice(0, messages.length - 1);
|
|
33
30
|
const lastMessage = messages[messages.length - 1];
|
|
@@ -56,31 +53,32 @@ export class GoogleAIChatInterface {
|
|
|
56
53
|
totalTokens: 0,
|
|
57
54
|
};
|
|
58
55
|
}
|
|
59
|
-
const chat =
|
|
56
|
+
const chat = this._genAI.chats.create({
|
|
57
|
+
model: request.model,
|
|
60
58
|
history: historyMessages,
|
|
61
|
-
|
|
59
|
+
config: {
|
|
62
60
|
maxOutputTokens: request.maxTokens,
|
|
63
61
|
topP: request.topP,
|
|
64
62
|
temperature: request.temperature,
|
|
65
63
|
stopSequences: request.stopWords,
|
|
66
64
|
},
|
|
67
65
|
});
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
const serializableResponse = toSerializableGoogleResponse(response);
|
|
71
|
-
const chatContents = await chat.getHistory();
|
|
72
|
-
const tokens = await model.countTokens({
|
|
73
|
-
contents: chatContents,
|
|
66
|
+
const response = await chat.sendMessage({
|
|
67
|
+
message: lastMessage.parts ?? [],
|
|
74
68
|
});
|
|
69
|
+
const serializableResponse = toSerializableGoogleResponse(response);
|
|
70
|
+
const usage = response.usageMetadata;
|
|
75
71
|
return {
|
|
76
72
|
choices: [
|
|
77
73
|
{
|
|
78
74
|
role: 'assistant',
|
|
79
|
-
content: response.text
|
|
75
|
+
content: response.text ?? '',
|
|
80
76
|
google: serializableResponse,
|
|
81
77
|
},
|
|
82
78
|
],
|
|
83
|
-
totalTokens:
|
|
79
|
+
totalTokens: usage?.totalTokenCount ?? 0,
|
|
80
|
+
inputTokens: usage?.promptTokenCount,
|
|
81
|
+
outputTokens: usage?.candidatesTokenCount,
|
|
84
82
|
google: serializableResponse,
|
|
85
83
|
};
|
|
86
84
|
}
|
|
@@ -105,9 +103,6 @@ export class GoogleAIChatInterface {
|
|
|
105
103
|
}
|
|
106
104
|
async *chatStream(request) {
|
|
107
105
|
try {
|
|
108
|
-
const model = this._genAI.getGenerativeModel({
|
|
109
|
-
model: request.model,
|
|
110
|
-
});
|
|
111
106
|
const messages = request.messages.map((m) => mapMessage(m));
|
|
112
107
|
const historyMessages = messages.slice(0, messages.length - 1);
|
|
113
108
|
const lastMessage = messages[messages.length - 1];
|
|
@@ -136,23 +131,34 @@ export class GoogleAIChatInterface {
|
|
|
136
131
|
totalTokens: 0,
|
|
137
132
|
};
|
|
138
133
|
}
|
|
139
|
-
const chat =
|
|
134
|
+
const chat = this._genAI.chats.create({
|
|
135
|
+
model: request.model,
|
|
140
136
|
history: historyMessages,
|
|
141
|
-
|
|
137
|
+
config: {
|
|
142
138
|
maxOutputTokens: request.maxTokens,
|
|
143
139
|
topP: request.topP,
|
|
144
140
|
temperature: request.temperature,
|
|
145
141
|
stopSequences: request.stopWords,
|
|
146
142
|
},
|
|
147
143
|
});
|
|
148
|
-
const result = await chat.sendMessageStream(
|
|
149
|
-
|
|
144
|
+
const result = await chat.sendMessageStream({
|
|
145
|
+
message: lastMessage.parts ?? [],
|
|
146
|
+
});
|
|
147
|
+
// Gemini reports cumulative usage metadata across the stream, with
|
|
148
|
+
// the latest (final) chunk holding the totals for the whole
|
|
149
|
+
// response. Track the most recent value and emit it once at the end
|
|
150
|
+
// so the totals are not counted multiple times by consumers.
|
|
151
|
+
let usage;
|
|
152
|
+
for await (const chunk of result) {
|
|
153
|
+
if (chunk.usageMetadata) {
|
|
154
|
+
usage = chunk.usageMetadata;
|
|
155
|
+
}
|
|
150
156
|
const serializableChunk = toSerializableGoogleResponse(chunk);
|
|
151
157
|
yield {
|
|
152
158
|
choices: [
|
|
153
159
|
{
|
|
154
160
|
role: 'assistant',
|
|
155
|
-
content: chunk.text
|
|
161
|
+
content: chunk.text ?? '',
|
|
156
162
|
google: serializableChunk,
|
|
157
163
|
},
|
|
158
164
|
],
|
|
@@ -160,13 +166,11 @@ export class GoogleAIChatInterface {
|
|
|
160
166
|
google: serializableChunk,
|
|
161
167
|
};
|
|
162
168
|
}
|
|
163
|
-
|
|
164
|
-
const tokens = await model.countTokens({
|
|
165
|
-
contents: chatContents,
|
|
166
|
-
});
|
|
167
|
-
return {
|
|
169
|
+
yield {
|
|
168
170
|
choices: [],
|
|
169
|
-
totalTokens:
|
|
171
|
+
totalTokens: usage?.totalTokenCount ?? 0,
|
|
172
|
+
inputTokens: usage?.promptTokenCount,
|
|
173
|
+
outputTokens: usage?.candidatesTokenCount,
|
|
170
174
|
};
|
|
171
175
|
}
|
|
172
176
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIChatInterface.js","sourceRoot":"","sources":["GoogleAIChatInterface.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"GoogleAIChatInterface.js","sourceRoot":"","sources":["GoogleAIChatInterface.ts"],"names":[],"mappings":";;;;;;AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAErE,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,MAAM,YAAY,GAAgB;IAC9B,IAAI,EAAE,QAAQ,CAAC,MAAM;IACrB,UAAU,EAAE;QACR,cAAc,EAAE,QAAQ;QACxB,cAAc,EAAE,QAAQ;KAC3B;CACJ,CAAC;AASF;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAI9B,YAAY,OAA4B;QACpC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC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AiB;IACnD,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACL,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC3C,MAAM,GAAG,GAAG,QAAmC,CAAC;YAChD,OAAO;gBACH,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC;gBAC7B,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC;gBACrC,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC;aACtC,CAAC;QACN,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;AACL,CAAC"}
|
package/README.md
CHANGED
|
@@ -256,7 +256,7 @@ Major dependencies include:
|
|
|
256
256
|
- **axios**: HTTP client for external services
|
|
257
257
|
- **stripe**: Payment processing
|
|
258
258
|
- **@anthropic-ai/sdk**: Anthropic AI integration
|
|
259
|
-
- **@google/
|
|
259
|
+
- **@google/genai**: Google AI integration
|
|
260
260
|
- **livekit-server-sdk**: Video conferencing
|
|
261
261
|
- And many more specialized libraries
|
|
262
262
|
|
package/RecordsServer.d.ts
CHANGED
|
@@ -2031,6 +2031,7 @@ export declare class RecordsServer {
|
|
|
2031
2031
|
"static inst": "static inst";
|
|
2032
2032
|
"local inst": "local inst";
|
|
2033
2033
|
"public inst": "public inst";
|
|
2034
|
+
public: "public";
|
|
2034
2035
|
"free inst": "free inst";
|
|
2035
2036
|
free: "free";
|
|
2036
2037
|
"private inst": "private inst";
|
|
@@ -2050,6 +2051,7 @@ export declare class RecordsServer {
|
|
|
2050
2051
|
"static inst": "static inst";
|
|
2051
2052
|
"local inst": "local inst";
|
|
2052
2053
|
"public inst": "public inst";
|
|
2054
|
+
public: "public";
|
|
2053
2055
|
"free inst": "free inst";
|
|
2054
2056
|
free: "free";
|
|
2055
2057
|
"private inst": "private inst";
|
|
@@ -2069,6 +2071,7 @@ export declare class RecordsServer {
|
|
|
2069
2071
|
"static inst": "static inst";
|
|
2070
2072
|
"local inst": "local inst";
|
|
2071
2073
|
"public inst": "public inst";
|
|
2074
|
+
public: "public";
|
|
2072
2075
|
"free inst": "free inst";
|
|
2073
2076
|
free: "free";
|
|
2074
2077
|
"private inst": "private inst";
|
|
@@ -2663,6 +2666,7 @@ export declare class RecordsServer {
|
|
|
2663
2666
|
* @param route The route that should be added.
|
|
2664
2667
|
*/
|
|
2665
2668
|
private _addProcedureApiRoute;
|
|
2669
|
+
private _buildUrl;
|
|
2666
2670
|
/**
|
|
2667
2671
|
* Adds the given procedural route to the server.
|
|
2668
2672
|
* @param route The route that should be added.
|
package/ServerConfig.d.ts
CHANGED
|
@@ -1201,6 +1201,7 @@ declare function constructServerConfigSchema(): z.ZodObject<{
|
|
|
1201
1201
|
"static inst": "static inst";
|
|
1202
1202
|
"local inst": "local inst";
|
|
1203
1203
|
"public inst": "public inst";
|
|
1204
|
+
public: "public";
|
|
1204
1205
|
"free inst": "free inst";
|
|
1205
1206
|
free: "free";
|
|
1206
1207
|
"private inst": "private inst";
|
|
@@ -1220,6 +1221,7 @@ declare function constructServerConfigSchema(): z.ZodObject<{
|
|
|
1220
1221
|
"static inst": "static inst";
|
|
1221
1222
|
"local inst": "local inst";
|
|
1222
1223
|
"public inst": "public inst";
|
|
1224
|
+
public: "public";
|
|
1223
1225
|
"free inst": "free inst";
|
|
1224
1226
|
free: "free";
|
|
1225
1227
|
"private inst": "private inst";
|
|
@@ -1239,6 +1241,7 @@ declare function constructServerConfigSchema(): z.ZodObject<{
|
|
|
1239
1241
|
"static inst": "static inst";
|
|
1240
1242
|
"local inst": "local inst";
|
|
1241
1243
|
"public inst": "public inst";
|
|
1244
|
+
public: "public";
|
|
1242
1245
|
"free inst": "free inst";
|
|
1243
1246
|
free: "free";
|
|
1244
1247
|
"private inst": "private inst";
|
|
@@ -2436,6 +2439,7 @@ export declare function getServerConfigSchema(): z.ZodObject<{
|
|
|
2436
2439
|
"static inst": "static inst";
|
|
2437
2440
|
"local inst": "local inst";
|
|
2438
2441
|
"public inst": "public inst";
|
|
2442
|
+
public: "public";
|
|
2439
2443
|
"free inst": "free inst";
|
|
2440
2444
|
free: "free";
|
|
2441
2445
|
"private inst": "private inst";
|
|
@@ -2455,6 +2459,7 @@ export declare function getServerConfigSchema(): z.ZodObject<{
|
|
|
2455
2459
|
"static inst": "static inst";
|
|
2456
2460
|
"local inst": "local inst";
|
|
2457
2461
|
"public inst": "public inst";
|
|
2462
|
+
public: "public";
|
|
2458
2463
|
"free inst": "free inst";
|
|
2459
2464
|
free: "free";
|
|
2460
2465
|
"private inst": "private inst";
|
|
@@ -2474,6 +2479,7 @@ export declare function getServerConfigSchema(): z.ZodObject<{
|
|
|
2474
2479
|
"static inst": "static inst";
|
|
2475
2480
|
"local inst": "local inst";
|
|
2476
2481
|
"public inst": "public inst";
|
|
2482
|
+
public: "public";
|
|
2477
2483
|
"free inst": "free inst";
|
|
2478
2484
|
free: "free";
|
|
2479
2485
|
"private inst": "private inst";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casual-simulation/aux-records",
|
|
3
|
-
"version": "4.2.6
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "Helpers and managers used by the CasualOS records system.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Casual Simulation, Inc.",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@anthropic-ai/sdk": "0.92.0",
|
|
34
|
-
"@casual-simulation/aux-common": "^4.2.
|
|
34
|
+
"@casual-simulation/aux-common": "^4.2.6",
|
|
35
35
|
"@casual-simulation/crypto": "^4.0.5",
|
|
36
36
|
"@casual-simulation/fast-json-stable-stringify": "^4.0.5",
|
|
37
37
|
"@casual-simulation/rate-limit-redis": "^4.0.0",
|
|
38
38
|
"@casual-simulation/timesync": "^4.0.0",
|
|
39
|
-
"@google/
|
|
39
|
+
"@google/genai": "^2.8.0",
|
|
40
40
|
"@libsql/client": "^0.15.14",
|
|
41
41
|
"@opentelemetry/api": "^1.9.0",
|
|
42
42
|
"@opentelemetry/resources": "^1.25.1",
|