Procházet zdrojové kódy

llama: parse JSON schema using nlohmann::ordered_json to maintain ordering (#8071)

Pascal Patry před 4 měsíci
rodič
revize
c216850523
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      llama/sampling_ext.cpp

+ 1 - 1
llama/sampling_ext.cpp

@@ -49,7 +49,7 @@ int schema_to_grammar(const char *json_schema, char *grammar, size_t max_len)
 {
     try
     {
-        nlohmann::json schema = nlohmann::json::parse(json_schema);
+        nlohmann::ordered_json schema = nlohmann::ordered_json::parse(json_schema);
         std::string grammar_str = json_schema_to_grammar(schema);
         size_t len = grammar_str.length();
         if (len >= max_len)