fix: Apply patch for mtmd_text_input

Branch: GraniteFour

Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
This commit is contained in:
Gabe Goodhart 2025-06-27 17:09:48 -06:00
parent f358dd5a1c
commit 58300273f4
2 changed files with 13 additions and 0 deletions

View File

@ -79,6 +79,16 @@ enum mtmd_slice_tmpl {
// TODO @ngxson : add support for idefics (SmolVLM)
};
mtmd_input_text* mtmd_input_text_init(const char * text, bool add_special, bool parse_special) {
return new mtmd_input_text{text, add_special, parse_special};
}
void mtmd_input_text_free(mtmd_input_text* input_text) {
if (input_text) {
delete input_text;
}
}
const char * mtmd_default_marker() {
return "<__media__>";
}

View File

@ -75,6 +75,9 @@ typedef struct mtmd_input_chunk mtmd_input_chunk;
typedef struct mtmd_input_chunks mtmd_input_chunks;
typedef struct mtmd_input_text mtmd_input_text;
MTMD_API mtmd_input_text* mtmd_input_text_init(const char * text, bool add_special, bool parse_special);
MTMD_API void mtmd_input_text_free(mtmd_input_text* input_text);
struct mtmd_context_params {
bool use_gpu;
bool print_timings;