[router] add dsr1, kimi, and qwen reasoning parser (#9353)
This commit is contained in:
@@ -96,14 +96,14 @@ pub struct ParserConfig {
|
||||
/// The token that marks the end of reasoning content.
|
||||
pub think_end_token: String,
|
||||
|
||||
/// Whether to force all text to be treated as reasoning.
|
||||
pub force_reasoning: bool,
|
||||
|
||||
/// Whether to stream reasoning content as it arrives.
|
||||
pub stream_reasoning: bool,
|
||||
|
||||
/// Maximum buffer size in bytes.
|
||||
pub max_buffer_size: usize,
|
||||
|
||||
/// Initial state for in_reasoning flag (fixed per parser type).
|
||||
pub initial_in_reasoning: bool,
|
||||
}
|
||||
|
||||
impl Default for ParserConfig {
|
||||
@@ -111,9 +111,9 @@ impl Default for ParserConfig {
|
||||
Self {
|
||||
think_start_token: "<think>".to_string(),
|
||||
think_end_token: "</think>".to_string(),
|
||||
force_reasoning: false,
|
||||
stream_reasoning: true,
|
||||
max_buffer_size: 65536, // 64KB default
|
||||
max_buffer_size: 65536, // 64KB default
|
||||
initial_in_reasoning: false, // Default to false (explicit reasoning)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user