]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server: fix remove 'image_url'/'input_audio' json-object effectlly for 'llama_params...
authorSky <redacted>
Wed, 28 May 2025 14:33:54 +0000 (22:33 +0800)
committerGitHub <redacted>
Wed, 28 May 2025 14:33:54 +0000 (16:33 +0200)
[fix]: remove 'image_url'/'input_audio' effectlly for 'llama_params' in multimodal-model-mode

tools/server/utils.hpp

index 8456a02e6fa291f3277d5b5d1e3c54d7c5d8ff49..14e09f95087fb2680bb8f673ae8baff682ac4340 100644 (file)
@@ -573,7 +573,7 @@ struct oaicompat_parser_options {
 
 // used by /chat/completions endpoint
 static json oaicompat_chat_params_parse(
-    const json & body, /* openai api json semantics */
+    json & body, /* openai api json semantics */
     const oaicompat_parser_options & opt,
     std::vector<raw_buffer> & out_files)
 {
@@ -624,7 +624,7 @@ static json oaicompat_chat_params_parse(
     if (!body.contains("messages")) {
         throw std::runtime_error("'messages' is required");
     }
-    json messages = body.at("messages");
+    json messages = body.at("messages");
     if (!messages.is_array()) {
         throw std::runtime_error("Expected 'messages' to be an array");
     }