(row)
| 68 | |
| 69 | @staticmethod |
| 70 | def build(row): |
| 71 | return Message( |
| 72 | assistant_id=row["assistant_id"], |
| 73 | chat_id=row["chat_id"], |
| 74 | message_id=row["message_id"], |
| 75 | role=MessageRole(row["role"]), |
| 76 | content=MessageContent(**load_json_attr(row, "content", {})), |
| 77 | num_tokens=row["num_tokens"], |
| 78 | metadata=load_json_attr(row, "metadata", {}), |
| 79 | created_timestamp=row["created_timestamp"], |
| 80 | updated_timestamp=row["updated_timestamp"], |
| 81 | ) |
| 82 | |
| 83 | def to_response_dict(self) -> Dict: |
| 84 | return { |
nothing calls this directly
no test coverage detected