We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce2fad1 commit bdb113cCopy full SHA for bdb113c
1 file changed
crates/tokenizer/src/tiktoken.rs
@@ -594,11 +594,14 @@ fn detect_renderer_from_config(dir: &Path) -> Renderer {
594
return Renderer::Jinja;
595
}
596
};
597
- let architectures = value.get("architectures").and_then(|v| v.as_array());
598
- let arch_strs: Vec<&str> = architectures
599
- .map(|a| a.iter().filter_map(|v| v.as_str()).collect())
600
- .unwrap_or_default();
601
- if arch_strs.contains(&"KimiK25ForConditionalGeneration") {
+ let is_kimi = value
+ .get("architectures")
+ .and_then(|v| v.as_array())
+ .is_some_and(|a| {
+ a.iter()
602
+ .any(|v| v.as_str() == Some("KimiK25ForConditionalGeneration"))
603
+ });
604
+ if is_kimi {
605
tracing::debug!(?path, "selected KimiK25Tools chat-template renderer");
606
return Renderer::KimiK25Tools;
607
0 commit comments