Add an assistant message with all 3 stages to a conversation. Args: conversation_id: Conversation identifier stage1: List of individual model responses stage2: List of model rankings stage3: Final synthesized response
(
conversation_id: str,
stage1: List[Dict[str, Any]],
stage2: List[Dict[str, Any]],
stage3: Dict[str, Any]
)
| 128 | |
| 129 | |
| 130 | def add_assistant_message( |
| 131 | conversation_id: str, |
| 132 | stage1: List[Dict[str, Any]], |
| 133 | stage2: List[Dict[str, Any]], |
| 134 | stage3: Dict[str, Any] |
| 135 | ): |
| 136 | """ |
| 137 | Add an assistant message with all 3 stages to a conversation. |
| 138 | |
| 139 | Args: |
| 140 | conversation_id: Conversation identifier |
| 141 | stage1: List of individual model responses |
| 142 | stage2: List of model rankings |
| 143 | stage3: Final synthesized response |
| 144 | """ |
| 145 | conversation = get_conversation(conversation_id) |
| 146 | if conversation is None: |
| 147 | raise ValueError(f"Conversation {conversation_id} not found") |
| 148 | |
| 149 | conversation["messages"].append({ |
| 150 | "role": "assistant", |
| 151 | "stage1": stage1, |
| 152 | "stage2": stage2, |
| 153 | "stage3": stage3 |
| 154 | }) |
| 155 | |
| 156 | save_conversation(conversation) |
| 157 | |
| 158 | |
| 159 | def update_conversation_title(conversation_id: str, title: str): |
nothing calls this directly
no test coverage detected