mirror of
https://github.com/arkorty/B.Tech-Project-III.git
synced 2026-04-19 12:41:48 +00:00
init
This commit is contained in:
24
negot8/backend/protocol/messages.py
Normal file
24
negot8/backend/protocol/messages.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List
|
||||
from enum import Enum
|
||||
|
||||
class MessageType(str, Enum):
|
||||
INITIATE = "initiate"
|
||||
PROPOSAL = "proposal"
|
||||
ACCEPT = "accept"
|
||||
COUNTER = "counter"
|
||||
ESCALATE = "escalate"
|
||||
|
||||
class AgentMessage(BaseModel):
|
||||
message_id: str
|
||||
negotiation_id: str
|
||||
message_type: MessageType
|
||||
sender_id: int
|
||||
receiver_id: int
|
||||
round_number: int
|
||||
payload: dict
|
||||
reasoning: str = ""
|
||||
satisfaction_score: float = 0.0
|
||||
concessions_made: List[str] = []
|
||||
concessions_requested: List[str] = []
|
||||
timestamp: str = ""
|
||||
Reference in New Issue
Block a user