openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
33 lines (32 loc) • 1.32 kB
JavaScript
import { r as createLazyRuntimeModule } from "../../lazy-runtime-zGjszCtt.mjs";
import { o as optionalPositiveIntegerSchema } from "../../typebox-BwU4K8-3.mjs";
import "../../channel-actions-DxuDuzvg.mjs";
import { t as defineToolPlugin } from "../../tool-plugin-B-9NRGYk.mjs";
import { t as llmTaskToolDefinition } from "../../llm-task-tool-definition-OXsmlVj9.mjs";
import { Type } from "typebox";
//#region extensions/llm-task/index.ts
var llm_task_default = defineToolPlugin({
id: "llm-task",
name: "LLM Task",
description: "Generic JSON-only LLM tool for structured tasks callable from workflows.",
configSchema: Type.Object({
defaultProvider: Type.Optional(Type.String()),
defaultModel: Type.Optional(Type.String()),
defaultAuthProfileId: Type.Optional(Type.String()),
maxTokens: optionalPositiveIntegerSchema(),
timeoutMs: optionalPositiveIntegerSchema()
}, { additionalProperties: false }),
tools: (e) => [e({
...llmTaskToolDefinition,
optional: true,
factory: ({ api: e }) => {
const t = createLazyRuntimeModule(() => import("../../llm-task-tool-CuCwAvjW.mjs").then(({ createLlmTaskTool: t }) => t(e)));
return {
...llmTaskToolDefinition,
execute: async (e, n, r) => await (await t()).execute(e, n, r)
};
}
})]
});
//#endregion
export { llm_task_default as default };