fix/no-reply-empty-content-detection #18
@@ -81,7 +81,7 @@ const PLUGINS_DIR = path.join(OPENCLAW_DIR, "plugins");
|
|||||||
const PLUGIN_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent");
|
const PLUGIN_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent");
|
||||||
const NO_REPLY_INSTALL_DIR = path.join(PLUGIN_INSTALL_DIR, "no-reply-api");
|
const NO_REPLY_INSTALL_DIR = path.join(PLUGIN_INSTALL_DIR, "no-reply-api");
|
||||||
|
|
||||||
const NO_REPLY_PROVIDER_ID = process.env.NO_REPLY_PROVIDER_ID || "dirigentway";
|
const NO_REPLY_PROVIDER_ID = process.env.NO_REPLY_PROVIDER_ID || "dirigent";
|
||||||
const NO_REPLY_MODEL_ID = process.env.NO_REPLY_MODEL_ID || "no-reply";
|
const NO_REPLY_MODEL_ID = process.env.NO_REPLY_MODEL_ID || "no-reply";
|
||||||
const NO_REPLY_PORT = Number(process.env.NO_REPLY_PORT || argNoReplyPort);
|
const NO_REPLY_PORT = Number(process.env.NO_REPLY_PORT || argNoReplyPort);
|
||||||
const NO_REPLY_BASE_URL = process.env.NO_REPLY_BASE_URL || `http://127.0.0.1:${NO_REPLY_PORT}/v1`;
|
const NO_REPLY_BASE_URL = process.env.NO_REPLY_BASE_URL || `http://127.0.0.1:${NO_REPLY_PORT}/v1`;
|
||||||
@@ -223,6 +223,11 @@ if (mode === "install") {
|
|||||||
};
|
};
|
||||||
setJson("models.providers", providers);
|
setJson("models.providers", providers);
|
||||||
|
|
||||||
|
// Add no-reply model to agents.defaults.models allowlist
|
||||||
|
const agentsDefaultsModels = getJson("agents.defaults.models") || {};
|
||||||
|
agentsDefaultsModels[`${NO_REPLY_PROVIDER_ID}/${NO_REPLY_MODEL_ID}`] = {};
|
||||||
|
setJson("agents.defaults.models", agentsDefaultsModels);
|
||||||
|
|
||||||
step(6, 6, "enable plugin in allowlist");
|
step(6, 6, "enable plugin in allowlist");
|
||||||
const allow = getJson("plugins.allow") || [];
|
const allow = getJson("plugins.allow") || [];
|
||||||
if (!allow.includes("dirigent")) {
|
if (!allow.includes("dirigent")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user