mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
getattr(item, type, None) -> item.type
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
21ae267feb
commit
0fb6a08827
1 changed files with 1 additions and 2 deletions
|
@ -162,8 +162,7 @@ class ConversationServiceImpl(Conversations):
|
|||
for item in items:
|
||||
# Generate item ID based on item type
|
||||
random_bytes = secrets.token_bytes(24)
|
||||
item_type = getattr(item, "type", None)
|
||||
if item_type == "message":
|
||||
if item.type == "message":
|
||||
item_id = f"msg_{random_bytes.hex()}"
|
||||
else:
|
||||
item_id = f"item_{random_bytes.hex()}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue