the finish reason for function calling should be

This commit is contained in:
Yingbei 2024-03-26 15:26:09 -07:00
parent 711fda99c6
commit eaa0f3d065
No known key found for this signature in database
GPG key ID: 01CC633FE90B97CD

View file

@ -697,7 +697,7 @@ static json format_final_response_oaicompat(const json & request, json result, c
printf("format_final_response_oaicompat: tool_call: %s\n", tool_call.dump().c_str()); printf("format_final_response_oaicompat: tool_call: %s\n", tool_call.dump().c_str());
oai_format_tool_calls.push_back(tool_call); oai_format_tool_calls.push_back(tool_call);
} }
choices = json::array({json{{"finish_reason", finish_reason}, choices = json::array({json{{"finish_reason", "tool_calls"},
{"index", 0}, {"index", 0},
{"message", json{{"tool_calls", oai_format_tool_calls}, {"message", json{{"tool_calls", oai_format_tool_calls},
{"role", "assistant"}}}}}); {"role", "assistant"}}}}});