From ebeea9daf82d678e14733b63399ac3b87f97a299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danie=CC=88l=20de=20Kok?= Date: Thu, 30 May 2024 12:31:35 +0000 Subject: [PATCH] router: send the input as chunks to the backend Before this change, the generation input was sent to the backend as a single string, encoding images as Base64 and packing them in Markdown-style links. This change adds a new chunked input representation that separates text chunks from images chunks. Image chunks contain binary data (for smaller message sizes) and the image's MIME type. The stringly-typed inputs are still sent to support backends that do not support chunked inputs yet. --- router/src/validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/src/validation.rs b/router/src/validation.rs index f14227a98..863bb99b5 100644 --- a/router/src/validation.rs +++ b/router/src/validation.rs @@ -714,7 +714,7 @@ pub enum ValidationError { #[cfg(test)] mod tests { use super::*; - use crate::config::{Idefics2, LlavaNext, PaliTextConfig, Paligemma, TextConfig, VisionConfig}; + use crate::config::{PaliTextConfig, Paligemma}; use crate::default_parameters; use crate::tests::get_tokenizer;