@@ -78,7 +78,7 @@ std::vector<uint8_t> base64_decode(std::string const& encoded_string) {
78
78
int i = 0 ;
79
79
int j = 0 ;
80
80
int in_ = 0 ;
81
- unsigned char char_array_4[4 ], char_array_3[3 ];
81
+ uint8_t char_array_4[4 ], char_array_3[3 ];
82
82
std::vector<uint8_t > ret;
83
83
while (in_len-- && ( encoded_string[in_] != ' =' ) && is_base64 (encoded_string[in_])) {
84
84
char_array_4[i++] = encoded_string[in_]; in_++;
@@ -884,7 +884,7 @@ struct llama_server_context
884
884
885
885
// append prefix of next image
886
886
batch.n_tokens = 0 ;
887
- const auto json_prompt = (image_idx >= slot.images .size ()) ?
887
+ const auto json_prompt = (image_idx >= slot.images .size ()) ?
888
888
slot.params .input_suffix : // no more images, then process suffix prompt
889
889
(json)(slot.images [image_idx].prefix_prompt );
890
890
std::vector<llama_token> append_tokens = tokenize (json_prompt, true ); // has next image
@@ -1818,7 +1818,7 @@ static void parse_options_completion(const json &body, llama_client_slot* slot,
1818
1818
slot->images .push_back (img_sl);
1819
1819
}
1820
1820
// process prompt
1821
- // example: system prompt < img-102> user < img-103> describe < img-134> -> [{id: 102, prefix: 'system prompt '}, {id: 103, prefix: ' user '}, {id: 134, prefix: ' describe '}]}
1821
+ // example: system prompt [ img-102] user [ img-103] describe [ img-134] -> [{id: 102, prefix: 'system prompt '}, {id: 103, prefix: ' user '}, {id: 134, prefix: ' describe '}]}
1822
1822
if (slot->images .size () > 0 && !slot->prompt .is_array ()) {
1823
1823
std::string prompt = slot->prompt .get <std::string>();
1824
1824
size_t pos = 0 , begin_prefix = 0 ;
0 commit comments