implement messages api and selector for nuclaude models

This commit is contained in:
based
2024-03-05 04:40:19 +10:00
parent adba450752
commit 04bb882e90
5 changed files with 58 additions and 82 deletions

View File

@ -249,6 +249,7 @@ async function loadClaudeTokenizer(modelPath) {
}
function countClaudeTokens(tokenizer, messages) {
// Should be fine if we use the old conversion method instead of the messages API one i think?
const convertedPrompt = convertClaudePrompt(messages, false, false, false);
// Fallback to strlen estimation