File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "mcpServers" : {
3+ "klavis-strata" : {
4+ "url" : " https://strata.klavis.ai/mcp/" ,
5+ "authorization" : " Bearer ${KLAVIS_API_KEY}"
6+ }
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ from eval_protocol .models import EvaluateResult , EvaluationRow , Message
2+ from eval_protocol .pytest import AgentRolloutProcessor , evaluation_test
3+
4+
5+ @evaluation_test (
6+ input_messages = [
7+ [
8+ [
9+ Message (
10+ role = "system" ,
11+ content = (
12+ "You are a helpful assistant that can answer questions about Gmail. You have access to tools to help you find information.\n "
13+ ),
14+ ),
15+ Message (
16+ role = "user" ,
17+ content = ("Find the first 5 emails title in my inbox." ),
18+ ),
19+ ]
20+ ]
21+ ],
22+ rollout_processor = AgentRolloutProcessor (),
23+ completion_params = [{"model" : "fireworks_ai/accounts/fireworks/models/kimi-k2-instruct" }],
24+ mode = "pointwise" ,
25+ mcp_config_path = "tests/pytest/mcp_configurations/klavis_strata_mcp.json" ,
26+ )
27+ def test_pytest_klavis_mcp (row : EvaluationRow ) -> EvaluationRow :
28+ # filter for all tool calls
29+ tool_calls = [msg for msg in row .messages if msg .role == "tool" ]
30+ if len (tool_calls ) == 0 :
31+ row .evaluation_result = EvaluateResult (
32+ score = 0 ,
33+ reason = "No tool calls made" ,
34+ )
35+ return row
36+
37+ row .evaluation_result = EvaluateResult (
38+ score = 1 ,
39+ reason = "At least one tool call was made" ,
40+ )
41+ return row
You can’t perform that action at this time.
0 commit comments