浏览代码

server : allow content to be null in oaicompat_completion_params_parse (#13477)

Anudit Nagar 8 月之前
父节点
当前提交
91159ee9df
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/server/utils.hpp

+ 1 - 1
tools/server/utils.hpp

@@ -644,7 +644,7 @@ static json oaicompat_completion_params_parse(
     }
     }
     for (auto & msg : messages) {
     for (auto & msg : messages) {
         json & content = msg.at("content");
         json & content = msg.at("content");
-        if (content.is_string()) {
+        if (content.is_string() || content.is_null()) {
             continue;
             continue;
         }
         }