@axiom-lattice/gateway 2.1.45 → 2.1.46
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 +10 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/models.ts +8 -0
- package/src/controllers/run.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -244,7 +244,8 @@ var createRun = async (request, reply) => {
|
|
|
244
244
|
try {
|
|
245
245
|
const result = await agent.addMessage({
|
|
246
246
|
input,
|
|
247
|
-
command
|
|
247
|
+
command,
|
|
248
|
+
custom_run_config
|
|
248
249
|
});
|
|
249
250
|
const stream = agent.chunkStream(result.messageId);
|
|
250
251
|
for await (const chunk of stream) {
|
|
@@ -274,7 +275,8 @@ var createRun = async (request, reply) => {
|
|
|
274
275
|
const { message: msg, ...restInputNonStream } = input;
|
|
275
276
|
const result = await agent.invoke({
|
|
276
277
|
input: { message: msg, ...restInputNonStream },
|
|
277
|
-
command
|
|
278
|
+
command,
|
|
279
|
+
custom_run_config
|
|
278
280
|
});
|
|
279
281
|
reply.status(200).send({
|
|
280
282
|
success: true,
|
|
@@ -1055,10 +1057,12 @@ async function getModels(request, reply) {
|
|
|
1055
1057
|
const allLattices = modelLatticeManager.getAllLattices();
|
|
1056
1058
|
const models = allLattices.map((lattice) => {
|
|
1057
1059
|
const config = lattice.client.config || {};
|
|
1060
|
+
const displayName = config.displayName || lattice.key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
1058
1061
|
return {
|
|
1059
1062
|
key: lattice.key,
|
|
1060
1063
|
model: config.model || "",
|
|
1061
1064
|
provider: config.provider || "openai",
|
|
1065
|
+
displayName,
|
|
1062
1066
|
streaming: config.streaming || false,
|
|
1063
1067
|
apiKey: config.apiKey || "",
|
|
1064
1068
|
baseURL: config.baseURL || "",
|
|
@@ -1108,6 +1112,7 @@ async function updateModels(request, reply) {
|
|
|
1108
1112
|
const llmConfig = {
|
|
1109
1113
|
provider: modelConfig.provider,
|
|
1110
1114
|
model: modelConfig.model,
|
|
1115
|
+
displayName: modelConfig.displayName,
|
|
1111
1116
|
streaming: modelConfig.streaming ?? false,
|
|
1112
1117
|
apiKey: modelConfig.apiKey,
|
|
1113
1118
|
baseURL: modelConfig.baseURL,
|