-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdomain_model.py
More file actions
56 lines (48 loc) · 1.64 KB
/
domain_model.py
File metadata and controls
56 lines (48 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
Data models and enumerations for the testing framework
"""
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Dict, Any, Optional
import time
class ProtocolType(Enum):
"""Enumeration of supported agent communication protocols"""
MCP = "MCP" # Model Context Protocol
A2A = "A2A" # Agent-to-Agent Protocol
ACP = "ACP" # Agent Communication Protocol
STANDARD = "standard" # Standard API calls
@dataclass
class ReasoningStep:
"""Represents a single step in the agent's reasoning process"""
step_number: int
thought: str
action: Optional[str] = None
action_input: Optional[str] = None
observation: Optional[str] = None
timestamp: float = field(default_factory=time.time)
@dataclass
class TestResult:
"""
Comprehensive test result containing all relevant information
Attributes:
model_name: HuggingFace model identifier
protocol: Communication protocol used
framework: Agent framework used for execution
task: The task/query given to the agent
response: Final response from the agent
reasoning_steps: List of intermediate reasoning steps
latency: Total execution time in seconds
success: Whether the test completed successfully
error: Error message if test failed
metadata: Additional framework-specific information
"""
model_name: str
protocol: ProtocolType
framework: str
task: str
response: str
reasoning_steps: List[ReasoningStep]
latency: float
success: bool
error: Optional[str] = None
metadata: Dict[str, Any] = field(default_factory=dict)