@tangle-network/agent-app 3.0.26 → 3.0.27
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.
|
@@ -63,9 +63,9 @@ export declare function createDefaultChatBackend<TContext, TResource>(projectId:
|
|
|
63
63
|
modelPolicy: ModelPolicy<import("../policy-filters/index.js").PolicyFilterContext> | undefined;
|
|
64
64
|
modelFailover: false;
|
|
65
65
|
errorNotice: boolean;
|
|
66
|
-
openEvents: ({
|
|
66
|
+
openEvents: ({ signal }: {
|
|
67
67
|
model: string;
|
|
68
68
|
signal: AbortSignal;
|
|
69
|
-
}) => AsyncGenerator<unknown,
|
|
69
|
+
}) => AsyncGenerator<unknown, any, any>;
|
|
70
70
|
}>;
|
|
71
71
|
};
|
|
@@ -3649,22 +3649,20 @@ function createDefaultChatBackend(projectId, env, config, bindings, modelPolicy)
|
|
|
3649
3649
|
sandbox: async (args) => {
|
|
3650
3650
|
const model = modelFor(args);
|
|
3651
3651
|
if (modelPolicy) await assertPolicy({ kind: "model", id: model, ...modelPolicy });
|
|
3652
|
+
const own = config.providers?.[model];
|
|
3653
|
+
const provider = typeof own === "function" ? await own(args) : own;
|
|
3652
3654
|
const box = await acquire(args);
|
|
3653
3655
|
return {
|
|
3654
3656
|
model,
|
|
3655
3657
|
modelPolicy,
|
|
3656
3658
|
modelFailover: false,
|
|
3657
3659
|
errorNotice: true,
|
|
3658
|
-
openEvents:
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
normalizeChatPromptForSandbox(args.prompt),
|
|
3665
|
-
{ ...promptOptions(args), model: model2, signal }
|
|
3666
|
-
);
|
|
3667
|
-
}
|
|
3660
|
+
openEvents: ({ signal }) => streamSandboxPrompt(
|
|
3661
|
+
provider ? { ...shell, provider } : shell,
|
|
3662
|
+
box,
|
|
3663
|
+
normalizeChatPromptForSandbox(args.prompt),
|
|
3664
|
+
{ ...promptOptions(args), model, signal }
|
|
3665
|
+
)
|
|
3668
3666
|
};
|
|
3669
3667
|
}
|
|
3670
3668
|
};
|
|
@@ -4179,4 +4177,4 @@ export {
|
|
|
4179
4177
|
createChatTurnRoutes,
|
|
4180
4178
|
streamChatRouteAsSandboxEvents
|
|
4181
4179
|
};
|
|
4182
|
-
//# sourceMappingURL=chunk-
|
|
4180
|
+
//# sourceMappingURL=chunk-5OE6SCHS.js.map
|