From eaa0f3d06588962e2ab92a57da346a0f11fe96b1 Mon Sep 17 00:00:00 2001 From: Yingbei Date: Tue, 26 Mar 2024 15:26:09 -0700 Subject: [PATCH] the finish reason for function calling should be --- examples/server/utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server/utils.hpp b/examples/server/utils.hpp index cd9172bcd..02545c5c1 100644 --- a/examples/server/utils.hpp +++ b/examples/server/utils.hpp @@ -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()); 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}, {"message", json{{"tool_calls", oai_format_tool_calls}, {"role", "assistant"}}}}});