We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3938fb commit c962ae3Copy full SHA for c962ae3
tools/server/utils.hpp
@@ -573,7 +573,7 @@ struct oaicompat_parser_options {
573
574
// used by /chat/completions endpoint
575
static json oaicompat_chat_params_parse(
576
- const json & body, /* openai api json semantics */
+ json & body, /* openai api json semantics */
577
const oaicompat_parser_options & opt,
578
std::vector<raw_buffer> & out_files)
579
{
@@ -624,7 +624,7 @@ static json oaicompat_chat_params_parse(
624
if (!body.contains("messages")) {
625
throw std::runtime_error("'messages' is required");
626
}
627
- json messages = body.at("messages");
+ json & messages = body.at("messages");
628
if (!messages.is_array()) {
629
throw std::runtime_error("Expected 'messages' to be an array");
630
0 commit comments