mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-02 16:54:42 +00:00
use pydantic v2's model_dump() instead of dict()
This commit is contained in:
parent
5fbfb9d854
commit
3ed2e816fa
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ def _convert_message(message: Message) -> Dict:
|
|||
"""
|
||||
Convert a Message to an OpenAI API-compatible dictionary.
|
||||
"""
|
||||
out_dict = message.dict()
|
||||
out_dict = message.model_dump()
|
||||
# Llama Stack uses role="ipython" for tool call messages, OpenAI uses "tool"
|
||||
if out_dict["role"] == "ipython":
|
||||
out_dict.update(role="tool")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue