File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -328,13 +328,17 @@ struct server_task {
328328 if (data.contains (" json_schema" ) && !data.contains (" grammar" )) {
329329 try {
330330 auto schema = json_value (data, " json_schema" , json::object ());
331- params.sampling .grammar = json_schema_to_grammar (schema);
331+ LOG_DBG (" JSON schema: %s\n " , schema.dump (2 ).c_str ());
332+ params.sampling .grammar = json_schema_to_grammar (schema);
333+ LOG_DBG (" Converted grammar: %s\n " , params.sampling .grammar .c_str ());
332334 } catch (const std::exception & e) {
333335 throw std::runtime_error (std::string (" \" json_schema\" : " ) + e.what ());
334336 }
335337 } else {
336338 params.sampling .grammar = json_value (data, " grammar" , defaults.sampling .grammar );
339+ LOG_DBG (" Grammar: %s\n " , params.sampling .grammar .c_str ());
337340 params.sampling .grammar_lazy = json_value (data, " grammar_lazy" , defaults.sampling .grammar_lazy );
341+ LOG_DBG (" Grammar lazy: %s\n " , params.sampling .grammar_lazy ? " true" : " false" );
338342 }
339343
340344 {
@@ -344,6 +348,7 @@ struct server_task {
344348 } else {
345349 params.oaicompat_chat_format = defaults.oaicompat_chat_format ;
346350 }
351+ LOG_DBG (" Chat format: %s\n " , common_chat_format_name (params.oaicompat_chat_format ).c_str ());
347352 }
348353
349354 {
You can’t perform that action at this time.
0 commit comments