Compare commits
No commits in common. "0d9812490a7ef394ad669ddb5b9a3966678f79aa" and "c7bacb674feba7bb4ddf6320ce9a33e17582e22c" have entirely different histories.
0d9812490a
...
c7bacb674f
1 changed files with 0 additions and 6 deletions
|
|
@ -126,12 +126,6 @@ class _CacheManager:
|
|||
return f"Error: missing required fields: {', '.join(sorted(missing))}"
|
||||
if "content" in data or "contents" in data or "raw" in data:
|
||||
return "Error: cache entries must not contain raw file contents."
|
||||
if "confidence" in data:
|
||||
c = data["confidence"]
|
||||
if not isinstance(c, (int, float)) or not (0.0 <= c <= 1.0):
|
||||
return "Error: confidence must be a float between 0.0 and 1.0"
|
||||
if "confidence_reason" in data and not isinstance(data["confidence_reason"], str):
|
||||
return "Error: confidence_reason must be a string"
|
||||
try:
|
||||
with open(cache_file, "w") as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue