MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / prompt_contains_image

Function prompt_contains_image

examples/llava/llava-cli.cpp:127–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127static bool prompt_contains_image(const std::string& prompt) {
128 size_t begin, end;
129 find_image_tag_in_prompt(prompt, begin, end);
130 return (begin != std::string::npos);
131}
132
133// replaces the base64 image tag in the prompt with `replacement`
134static llava_image_embed * llava_image_embed_make_with_prompt_base64(struct clip_ctx * ctx_clip, int n_threads, const std::string& prompt) {

Callers 2

load_imageFunction · 0.85
mainFunction · 0.85

Calls 1

find_image_tag_in_promptFunction · 0.85

Tested by

no test coverage detected