@axiom-lattice/gateway 2.1.45 → 2.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +19 -0
- package/dist/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/models.ts +8 -0
- package/src/controllers/run.ts +19 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.47 build /home/runner/work/agentic/agentic/packages/gateway
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m164.
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
16
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
17
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m164.62 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m359.12 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 306ms
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m168.05 KB[39m
|
|
16
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m358.68 KB[39m
|
|
17
|
+
[32mCJS[39m ⚡️ Build success in 308ms
|
|
18
18
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 9305ms
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.76 KB[39m
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.76 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @axiom-lattice/gateway
|
|
2
2
|
|
|
3
|
+
## 2.1.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fc60965: fix schedule issue
|
|
8
|
+
- Updated dependencies [fc60965]
|
|
9
|
+
- @axiom-lattice/core@2.1.41
|
|
10
|
+
- @axiom-lattice/pg-stores@1.0.31
|
|
11
|
+
|
|
12
|
+
## 2.1.46
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [f29ff90]
|
|
17
|
+
- @axiom-lattice/pg-stores@1.0.30
|
|
18
|
+
- @axiom-lattice/protocols@2.1.22
|
|
19
|
+
- @axiom-lattice/core@2.1.40
|
|
20
|
+
- @axiom-lattice/queue-redis@1.0.21
|
|
21
|
+
|
|
3
22
|
## 2.1.45
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -275,7 +275,8 @@ var createRun = async (request, reply) => {
|
|
|
275
275
|
try {
|
|
276
276
|
const result = await agent.addMessage({
|
|
277
277
|
input,
|
|
278
|
-
command
|
|
278
|
+
command,
|
|
279
|
+
custom_run_config
|
|
279
280
|
});
|
|
280
281
|
const stream = agent.chunkStream(result.messageId);
|
|
281
282
|
for await (const chunk of stream) {
|
|
@@ -305,7 +306,8 @@ var createRun = async (request, reply) => {
|
|
|
305
306
|
const { message: msg, ...restInputNonStream } = input;
|
|
306
307
|
const result = await agent.invoke({
|
|
307
308
|
input: { message: msg, ...restInputNonStream },
|
|
308
|
-
command
|
|
309
|
+
command,
|
|
310
|
+
custom_run_config
|
|
309
311
|
});
|
|
310
312
|
reply.status(200).send({
|
|
311
313
|
success: true,
|
|
@@ -321,11 +323,14 @@ var createRun = async (request, reply) => {
|
|
|
321
323
|
};
|
|
322
324
|
var resumeStream = async (request, reply) => {
|
|
323
325
|
try {
|
|
324
|
-
const { thread_id, message_id, known_content, poll_interval } = request.body;
|
|
325
|
-
|
|
326
|
+
const { thread_id, message_id, assistant_id, known_content, poll_interval } = request.body;
|
|
327
|
+
const tenant_id = request.headers["x-tenant-id"];
|
|
328
|
+
const workspace_id = request.headers["x-workspace-id"];
|
|
329
|
+
const project_id = request.headers["x-project-id"];
|
|
330
|
+
if (!thread_id || !message_id || !assistant_id || known_content === void 0) {
|
|
326
331
|
reply.status(400).send({
|
|
327
332
|
success: false,
|
|
328
|
-
error: "thread_id, message_id, and known_content are required"
|
|
333
|
+
error: "thread_id, message_id, assistant_id, and known_content are required"
|
|
329
334
|
});
|
|
330
335
|
return;
|
|
331
336
|
}
|
|
@@ -337,10 +342,12 @@ var resumeStream = async (request, reply) => {
|
|
|
337
342
|
"Access-Control-Allow-Origin": "*"
|
|
338
343
|
});
|
|
339
344
|
try {
|
|
340
|
-
const agent =
|
|
341
|
-
assistant_id
|
|
345
|
+
const agent = import_core3.agentInstanceManager.getAgent({
|
|
346
|
+
assistant_id,
|
|
342
347
|
thread_id,
|
|
343
|
-
tenant_id
|
|
348
|
+
tenant_id,
|
|
349
|
+
workspace_id,
|
|
350
|
+
project_id
|
|
344
351
|
});
|
|
345
352
|
const stream = agent.chunkStream(message_id, known_content);
|
|
346
353
|
for await (const chunk of stream) {
|
|
@@ -1082,10 +1089,12 @@ async function getModels(request, reply) {
|
|
|
1082
1089
|
const allLattices = import_core9.modelLatticeManager.getAllLattices();
|
|
1083
1090
|
const models = allLattices.map((lattice) => {
|
|
1084
1091
|
const config = lattice.client.config || {};
|
|
1092
|
+
const displayName = config.displayName || lattice.key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
1085
1093
|
return {
|
|
1086
1094
|
key: lattice.key,
|
|
1087
1095
|
model: config.model || "",
|
|
1088
1096
|
provider: config.provider || "openai",
|
|
1097
|
+
displayName,
|
|
1089
1098
|
streaming: config.streaming || false,
|
|
1090
1099
|
apiKey: config.apiKey || "",
|
|
1091
1100
|
baseURL: config.baseURL || "",
|
|
@@ -1135,6 +1144,7 @@ async function updateModels(request, reply) {
|
|
|
1135
1144
|
const llmConfig = {
|
|
1136
1145
|
provider: modelConfig.provider,
|
|
1137
1146
|
model: modelConfig.model,
|
|
1147
|
+
displayName: modelConfig.displayName,
|
|
1138
1148
|
streaming: modelConfig.streaming ?? false,
|
|
1139
1149
|
apiKey: modelConfig.apiKey,
|
|
1140
1150
|
baseURL: modelConfig.baseURL,
|