mirror of
https://github.com/katanemo/plano.git
synced 2026-04-26 17:26:26 +02:00
fix model warning and use openwebui for preference based router demo
This commit is contained in:
parent
fffa837a06
commit
176f039bbc
4 changed files with 18 additions and 16 deletions
|
|
@ -12,10 +12,15 @@ pub fn token_count(model_name: &str, text: &str) -> Result<usize, String> {
|
|||
"tiktoken_rs: unsupported model: {}, using gpt-4 to compute token count",
|
||||
model_name
|
||||
);
|
||||
|
||||
"gpt-4"
|
||||
}
|
||||
true => model_name,
|
||||
true => {
|
||||
if model_name.starts_with("gpt-4.1") {
|
||||
"gpt-4o"
|
||||
} else {
|
||||
model_name
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Consideration: is it more expensive to instantiate the BPE object every time, or to contend the singleton?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue