Skip to content

Commit 66d03fe

Browse files
committed
fix lint
1 parent 11b39e0 commit 66d03fe

5 files changed

Lines changed: 19 additions & 4 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,18 @@ uv run pytest test/test_generate_sql.py
825825
uv run pytest test/test_agent_graph.py
826826
```
827827

828+
#### RunLedger Replay Evals
829+
830+
RunLedger provides deterministic replay coverage for the agent/tool protocol
831+
using recorded JSONL cassettes. It does not require live LLM or warehouse access
832+
in replay mode.
833+
834+
```bash
835+
uv run --extra eval runledger run evals/runledger --mode replay --baseline baselines/runledger-openchatbi.json
836+
```
837+
838+
Run artifacts are written under `runledger_out/`.
839+
828840
### Pre-commit Hooks
829841

830842
Install pre-commit hooks for automatic code quality checks:

evals/runledger/agent/agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import json
33
import sys
44
from itertools import count
5-
from typing import Literal
6-
from typing import Any
5+
from typing import Any, Literal
76
from unittest.mock import MagicMock
87

98
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage

evals/runledger/suite.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ budgets:
2020
max_tool_calls: 8
2121
max_tool_errors: 0
2222

23+
regression:
24+
min_pass_rate: 0.95
25+
2326
baseline_path: ../../baselines/runledger-openchatbi.json

openchatbi/streaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _message_list(value: object) -> list[object]:
142142
if value is None:
143143
return []
144144
if value.__class__.__name__ == "Overwrite" and hasattr(value, "value"):
145-
value = getattr(value, "value")
145+
value = value.value
146146
if isinstance(value, list | tuple):
147147
return list(value)
148148
return [value]

tests/test_tools_search_knowledge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from unittest.mock import Mock, patch
55

66
import pytest
7+
from pydantic import ValidationError
78

89
from openchatbi.tool import search_knowledge as sk
910
from openchatbi.tool.search_knowledge import search_knowledge, search_schema, show_schema
@@ -127,7 +128,7 @@ def test_search_knowledge_business_without_dedicated_store(self):
127128
assert "No dedicated business knowledge available" in result["warnings"][0]
128129

129130
def test_search_knowledge_rejects_invalid_knowledge_base(self):
130-
with pytest.raises(Exception):
131+
with pytest.raises(ValidationError):
131132
search_knowledge.invoke(
132133
{
133134
"reasoning": "invalid kb",

0 commit comments

Comments
 (0)