mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-09 11:15:08 +08:00
Conversation messages refactor add msg ids (#500)
* update ConversationMessage in protocal.py * updated ConversationMessage instantiations in tasks.py and util.py to include message_id and frontend_message_id * changed message_id and frontend_message_id to type UUID * update ConversationMessage instantiation in main.py to include message_id and frontend_message_id" * changed frontend_message_id to type str * ran precomit
This commit is contained in:
+5
-2
@@ -136,9 +136,12 @@ if settings.DEBUG_USE_SEED_DATA:
|
||||
conversation = protocol_schema.Conversation(
|
||||
messages=[
|
||||
protocol_schema.ConversationMessage(
|
||||
text=msg.text, is_assistant=msg.role == "assistant"
|
||||
text=cmsg.text,
|
||||
is_assistant=cmsg.role == "assistant",
|
||||
message_id=cmsg.id,
|
||||
fronend_message_id=cmsg.frontend_message_id,
|
||||
)
|
||||
for msg in conversation_messages
|
||||
for cmsg in conversation_messages
|
||||
]
|
||||
)
|
||||
task = pr.store_task(
|
||||
|
||||
Reference in New Issue
Block a user