Stop repeated volume decisions in Holmes
This commit is contained in:
parent
7c88b42c61
commit
15f662a279
|
|
@ -178,6 +178,10 @@ def complete(request, bash_mode):
|
|||
"Otherwise state what evidence is missing. Do not repeat the PVC or PV lookup."}]
|
||||
retried = translate(query_ollama(retry), request["tools"])
|
||||
print("resource_decision_retry", "tool_call=" + str(bool(retried["choices"][0]["message"].get("tool_calls"))), flush=True)
|
||||
if same_as_last_call(retried["choices"][0]["message"], messages):
|
||||
retried["choices"][0]["message"] = {"role": "assistant", "content":
|
||||
"JEANNIE_STOP_REPEATED_TOOL_CALL: Holmes repeated the preceding command; investigation is incomplete."}
|
||||
retried["choices"][0]["finish_reason"] = "stop"
|
||||
return retried
|
||||
next_check = ("The PVC was already inspected. Check the bound PV by its actual PV name; use kubectl get pv, not get pvc. "
|
||||
if re.search(r"\bget\s+(?:pvc|persistentvolumeclaim)\b", previous) else
|
||||
|
|
|
|||
Loading…
Reference in New Issue