parse reasoning_content alias (deepseek/z.ai reasoning field name)
This commit is contained in:
parent
33068d69ff
commit
b4dc39e501
1 changed files with 4 additions and 2 deletions
|
|
@ -248,7 +248,8 @@ pub struct ResponseMessage {
|
|||
pub role: String,
|
||||
#[serde(default)]
|
||||
pub content: Option<String>,
|
||||
#[serde(default)]
|
||||
// OpenRouter says "reasoning"; DeepSeek and z.ai say "reasoning_content".
|
||||
#[serde(default, alias = "reasoning_content")]
|
||||
pub reasoning: Option<String>,
|
||||
#[serde(default)]
|
||||
pub tool_calls: Option<Vec<ToolCall>>,
|
||||
|
|
@ -294,7 +295,8 @@ pub struct StreamChoice {
|
|||
pub struct Delta {
|
||||
#[serde(default)]
|
||||
pub content: Option<String>,
|
||||
#[serde(default)]
|
||||
// OpenRouter says "reasoning"; DeepSeek and z.ai say "reasoning_content".
|
||||
#[serde(default, alias = "reasoning_content")]
|
||||
pub reasoning: Option<String>,
|
||||
#[serde(default)]
|
||||
pub role: Option<String>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue