atlasbot: force cluster intent in prompts
This commit is contained in:
parent
ca3cfaf1fc
commit
f649a6a9a2
@ -16,7 +16,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: atlasbot
|
app: atlasbot
|
||||||
annotations:
|
annotations:
|
||||||
checksum/atlasbot-configmap: manual-atlasbot-43
|
checksum/atlasbot-configmap: manual-atlasbot-44
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
vault.hashicorp.com/role: "comms"
|
vault.hashicorp.com/role: "comms"
|
||||||
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
||||||
|
|||||||
@ -1868,9 +1868,12 @@ class _AtlasbotHandler(BaseHTTPRequestHandler):
|
|||||||
workloads=workloads,
|
workloads=workloads,
|
||||||
)
|
)
|
||||||
fallback = "I don't have enough data to answer that."
|
fallback = "I don't have enough data to answer that."
|
||||||
|
llm_prompt = cleaned
|
||||||
|
if cluster_query:
|
||||||
|
llm_prompt = f"Atlas cluster question: {cleaned}"
|
||||||
answer = ollama_reply(
|
answer = ollama_reply(
|
||||||
("http", "internal"),
|
("http", "internal"),
|
||||||
cleaned,
|
llm_prompt,
|
||||||
context=context,
|
context=context,
|
||||||
fallback=fallback,
|
fallback=fallback,
|
||||||
use_history=False,
|
use_history=False,
|
||||||
@ -2313,11 +2316,14 @@ def sync_loop(token: str, room_id: str):
|
|||||||
context = (context + "\n\n" + extra).strip() if context else extra
|
context = (context + "\n\n" + extra).strip() if context else extra
|
||||||
fallback = "I don't have enough data to answer that."
|
fallback = "I don't have enough data to answer that."
|
||||||
|
|
||||||
|
llm_prompt = cleaned_body
|
||||||
|
if cluster_query:
|
||||||
|
llm_prompt = f"Atlas cluster question: {cleaned_body}"
|
||||||
reply = ollama_reply_with_thinking(
|
reply = ollama_reply_with_thinking(
|
||||||
token,
|
token,
|
||||||
rid,
|
rid,
|
||||||
hist_key,
|
hist_key,
|
||||||
cleaned_body,
|
llm_prompt,
|
||||||
context=context,
|
context=context,
|
||||||
fallback=fallback,
|
fallback=fallback,
|
||||||
use_history=cluster_query,
|
use_history=cluster_query,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user