Skip to content

Commit 40b9fae

Browse files
Benny ChenBenny Chen
authored andcommitted
fixes
1 parent 0ad0ee9 commit 40b9fae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

eval_protocol/integrations/deepeval.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def _build_case_kwargs() -> Dict[str, Any]:
8080
return case_kwargs
8181

8282
if BaseConversationalMetric is not None and isinstance(metric, BaseConversationalMetric):
83+
# Narrow types for optional imports to satisfy the type checker
84+
assert LLMTestCase is not None
85+
assert ConversationalTestCase is not None
8386
turns = []
8487
for i, msg in enumerate(messages):
8588
turn_input = messages[i - 1].get("content", "") if i > 0 else ""
@@ -93,6 +96,8 @@ def _build_case_kwargs() -> Dict[str, Any]:
9396
output = messages[-1].get("content", "")
9497
test_case = ConversationalTestCase(turns=turns)
9598
else:
99+
# Narrow types for optional imports to satisfy the type checker
100+
assert LLMTestCase is not None
96101
case_kwargs = _build_case_kwargs()
97102
test_case = LLMTestCase(**case_kwargs)
98103

eval_protocol/mcp_servers/tau2/tau2_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def _register_tools(self):
422422
"""Register mock-specific MCP tools matching τ²-Bench schemas"""
423423

424424
@self.mcp.tool(name="create_task", description="Create a new task for a user.")
425-
def create_task(user_id: str, title: str, ctx: Context, description: str = None) -> Dict[str, Any]:
425+
def create_task(user_id: str, title: str, ctx: Context, description: Optional[str] = None) -> Dict[str, Any]:
426426
"""Create a new task for a user"""
427427
session_id = self._get_session_id(ctx)
428428

0 commit comments

Comments
 (0)