Legacy input and output agent schema
Note
The SplitChatMessageRequest
input schema and StringResponse
output schema have been deprecated. If you are using either of these legacy schemas, Databricks recommends that you migrate to the recommended ChatModel
schema. See Author AI agents in code.
AI agents must adhere to specific input and output schema requirements to be compatible with other features on Databricks. This article explains how to use the SplitChatMessageRequest
input schema and StringResponse
output schema to ensure compatibility with Databricks features.
SplitChatMessageRequest input schema (deprecated)
SplitChatMessagesRequest
allows you to pass the current query and history separately as agent input.
question = {
"query": "What is MLflow",
"history": [
{
"role": "user",
"content": "What is Retrieval-augmented Generation?"
},
{
"role": "assistant",
"content": "RAG is"
}
]
}