[router][grpc] Refine streaming processes (#11277)
This commit is contained in:
@@ -187,6 +187,10 @@ impl ReasoningParser for BaseReasoningParser {
|
||||
fn model_type(&self) -> &str {
|
||||
&self.model_type
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.in_reasoning
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -55,6 +55,10 @@ impl ReasoningParser for DeepSeekR1Parser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -54,6 +54,10 @@ impl ReasoningParser for Glm45Parser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -54,6 +54,10 @@ impl ReasoningParser for KimiParser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -55,6 +55,10 @@ impl ReasoningParser for Qwen3Parser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
/// QwenThinking parser - variant that assumes reasoning from start.
|
||||
@@ -106,6 +110,10 @@ impl ReasoningParser for QwenThinkingParser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -54,6 +54,10 @@ impl ReasoningParser for Step3Parser {
|
||||
fn model_type(&self) -> &str {
|
||||
self.base.model_type()
|
||||
}
|
||||
|
||||
fn is_in_reasoning(&self) -> bool {
|
||||
self.base.is_in_reasoning()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user