diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index d4d6668..47d0992 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-46 + checksum/atlasbot-configmap: manual-atlasbot-47 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" diff --git a/services/comms/scripts/atlasbot/bot.py b/services/comms/scripts/atlasbot/bot.py index 429fa31..351bb40 100644 --- a/services/comms/scripts/atlasbot/bot.py +++ b/services/comms/scripts/atlasbot/bot.py @@ -2124,11 +2124,9 @@ def _ollama_call(hist_key, prompt: str, *, context: str, use_history: bool = Tru endpoint = _ollama_endpoint() if not endpoint: raise RuntimeError("ollama endpoint missing") - system_content = system + messages: list[dict[str, str]] = [{"role": "system", "content": system}] if context: - system_content += "\n\nContext (grounded):\n" + context[:MAX_CONTEXT_CHARS] - - messages: list[dict[str, str]] = [{"role": "system", "content": system_content}] + messages.append({"role": "user", "content": "Context (grounded):\n" + context[:MAX_CONTEXT_CHARS]}) if use_history: messages.extend(_history_to_messages(history[hist_key][-24:])) messages.append({"role": "user", "content": prompt})