pub enum Message {
System {
content: String,
name: Option<String>,
},
User {
content: String,
name: Option<String>,
},
Assistant {
content: Option<String>,
refusal: Option<String>,
name: Option<String>,
prefix: bool,
reasoning_content: Option<String>,
tool_calls: Option<Vec<AssistantToolCall>>,
},
Tool {
content: String,
tool_call_id: String,
},
}
Variants§
System
In this case, the role of the message author is system
.
The field { role = "system" }
is added automatically.
Fields
User
In this case, the role of the message author is user
.
The field { role = "user" }
is added automatically.
Fields
Assistant
In this case, the role of the message author is assistant
.
The field { role = "assistant" }
is added automatically.
Unimplemented params:
- audio: Data about a previous audio response from the model.
Fields
content: Option<String>
The contents of the assistant message. Required unless tool_calls
or function_call
is specified. (Note that function_call
is deprecated
in favour of tool_calls
.)
reasoning_content: Option<String>
Used for the deepseek-reasoner model in the Chat Prefix Completion feature as the input for the CoT in the last assistant message. When using this feature, the prefix parameter must be set to true.
tool_calls: Option<Vec<AssistantToolCall>>
The tool calls generated by the model, such as function calls.
Tool
In this case, the role of the message author is assistant
.
The field { role = "tool" }
is added automatically.