Alberto_Umana
Databricks Employee
Databricks Employee

Hi @bryan1,

I have just tested this sample code and worked for me on 0.40 SDK version, can you try it too?

 

from databricks.sdk.service.serving import ChatMessage

def test_chat_message():
message = ChatMessage(role="user", content="Hello, how can I help you today?")

print(f"Role: {message.role}")
print(f"Content: {message.content}")

assert message.role == "user"
assert message.content == "Hello, how can I help you today?"
test_chat_message()