atlasbot: preserve response text with confidence
This commit is contained in:
parent
3b1e74d278
commit
41b131c347
@ -16,7 +16,7 @@ spec:
|
||||
labels:
|
||||
app: atlasbot
|
||||
annotations:
|
||||
checksum/atlasbot-configmap: manual-atlasbot-34
|
||||
checksum/atlasbot-configmap: manual-atlasbot-35
|
||||
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"
|
||||
|
||||
@ -149,7 +149,7 @@ def _ensure_confidence(text: str) -> str:
|
||||
match = CONFIDENCE_RE.search(line)
|
||||
if match:
|
||||
level = match.group(1).lower()
|
||||
lines[idx] = f"Confidence: {level}"
|
||||
lines[idx] = CONFIDENCE_RE.sub(f"Confidence: {level}", line)
|
||||
return "\n".join(lines)
|
||||
lines.append("Confidence: medium")
|
||||
return "\n".join(lines)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user