Always serialize messages field in ChatRequest
The Ollama API expects the messages field to be present in chat requests. Removed skip_serializing_if on messages so it serializes as an empty array rather than being omitted entirely.
This commit is contained in:
@@ -51,7 +51,6 @@ impl Message {
|
||||
pub struct ChatRequest {
|
||||
pub model: String,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
pub messages: Vec<Message>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in New Issue
Block a user