Skip to content

Commit

Permalink
fix: adjust unwrap syntax in template
Browse files Browse the repository at this point in the history
  • Loading branch information
drbh committed Jun 28, 2024
1 parent 8885688 commit a00db1b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions router/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,20 +293,8 @@ impl ChatTemplate {

Self {
template,
bos_token: match bos_token {
Some(token) => match token {
TokenizerConfigToken::String(token) => Some(token),
TokenizerConfigToken::Object { content } => Some(content),
},
None => None,
},
eos_token: match eos_token {
Some(token) => match token {
TokenizerConfigToken::String(token) => Some(token),
TokenizerConfigToken::Object { content } => Some(content),
},
None => None,
},
bos_token: bos_token.map(|token| token.as_str().to_string()),
eos_token: eos_token.map(|token| token.as_str().to_string()),
use_default_tool_template,
}
}
Expand Down

0 comments on commit a00db1b

Please sign in to comment.