mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 05:16:48 +00:00
Adicionou HERMES_SOUL_OVERRIDE
X-Lovable-Edit-ID: edt-027b70bc-300c-4516-a36f-2d066ddf9960 Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
commit
7701011bc7
2 changed files with 6 additions and 5 deletions
|
|
@ -207,11 +207,15 @@ Deno.serve(async (req) => {
|
|||
const hasChatId = !!agent.telegram_user_chat_id;
|
||||
const chatIdStr = hasChatId ? String(agent.telegram_user_chat_id) : "";
|
||||
|
||||
const defaultSoul = `Você se chama ${agentName}. Você é um assistente pessoal de IA criado pela DomCo. exclusivamente para ${fullName}. Seu estilo: Direto e objetivo, sempre em português brasileiro, respostas curtas no Telegram, use emojis com moderação, trate ${firstName} pelo primeiro nome. Suas prioridades: produtividade, automação proativa. Identidade: você é ${agentName} da DomCo., nunca se identifique como Hermes ou qualquer outro modelo.`;
|
||||
const soulContent = body.soul_content?.trim() || defaultSoul;
|
||||
|
||||
const envVars: Record<string, string> = {
|
||||
HERMES_HOME: "/opt/data/.hermes",
|
||||
API_SERVER_ENABLED: "true",
|
||||
API_SERVER_KEY: Deno.env.get("HERMES_API_SERVER_KEY") ?? "",
|
||||
GATEWAY_ALLOW_ALL_USERS: "false",
|
||||
HERMES_SOUL_OVERRIDE: soulContent,
|
||||
HERMES_STT_PROVIDER: sttProvider,
|
||||
HERMES_TTS_PROVIDER: ttsProvider,
|
||||
OLLAMA_API_KEY: Deno.env.get("OLLAMA_API_KEY") ?? "",
|
||||
|
|
|
|||
|
|
@ -101,12 +101,9 @@ Deno.serve(async (req) => {
|
|||
return jsonResponse(500, { error: "failed to resolve railway project/environment" });
|
||||
}
|
||||
|
||||
// 4) Upsert variáveis (SOUL.md agora vive na imagem Docker — não sobrescrever via env)
|
||||
// 4) Upsert variáveis (incluindo HERMES_SOUL_OVERRIDE editado pelo admin)
|
||||
const variables: Record<string, string> = {
|
||||
OLLAMA_API_KEY: Deno.env.get("OLLAMA_API_KEY") ?? "",
|
||||
TELEGRAM_BOT_TOKEN: Deno.env.get("TELEGRAM_BOT_TOKEN") ?? "",
|
||||
TELEGRAM_ALLOWED_USERS: Deno.env.get("TELEGRAM_ALLOWED_USERS") ?? "",
|
||||
TELEGRAM_HOME_CHANNEL: Deno.env.get("TELEGRAM_HOME_CHANNEL") ?? "",
|
||||
HERMES_SOUL_OVERRIDE: body.soul_content,
|
||||
HERMES_STT_PROVIDER: body.stt_provider || "local",
|
||||
HERMES_TTS_PROVIDER: body.tts_provider || "disabled",
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue