server : enable multi-modal prompt caching (#19877)

This commit is contained in:
Georgi Gerganov authored and GitHub committed 2026-02-25 15:15:42 +02:00
1 parent d7d826b3c1
commit f20469d919
2 files changed
+1 -5

No files matched your search

+1 -2
View File
@@ -1900,10 +1900,9 @@ server_prompt * server_prompt_cache::alloc(const server_prompt & prompt, size_t
return nullptr;
}
// TODO: for some reason we can't copy server_tokens, so we have to do this workaround
auto & cur = states.emplace_back();
cur = {
/*.tokens =*/ server_tokens(prompt.tokens.get_text_tokens(), false),
/*.tokens =*/ prompt.tokens.clone(),
/*.data =*/ std::move(state_data),
/*.checkpoints =*/ prompt.checkpoints,
};