Merge pull request #496 from openai/dev/atty/fix-finish-reason

Fix `finish_reason` in function calling cookbook
This commit is contained in:
colin-openai 2023-06-13 20:08:25 +01:00 committed by GitHub
commit f62fd7c99d

View File

@ -13,7 +13,7 @@
"\n", "\n",
"`functions` is an optional parameter in the ChatCompletion API which can be used to provide function specifications. The purpose of this is to enable models to generate outputs which adhere to function input schemas. Note that the API will not actually execute any function calls. It is up to developers to execute function calls using model outputs.\n", "`functions` is an optional parameter in the ChatCompletion API which can be used to provide function specifications. The purpose of this is to enable models to generate outputs which adhere to function input schemas. Note that the API will not actually execute any function calls. It is up to developers to execute function calls using model outputs.\n",
"\n", "\n",
"If the `functions` parameter is provided then by default the model will decide when it is appropriate to use one of the functions. The API can also be forced to use a specific function by setting the `function_call` parameter to `{\"name\": \"<insert-function-name>\"}`. If a function is used, the output will contain `\"finish_reason\": \"function_message\"` in the response, as well as a `function_call` object that has the name of the function and the generated function arguments.\n", "If the `functions` parameter is provided then by default the model will decide when it is appropriate to use one of the functions. The API can also be forced to use a specific function by setting the `function_call` parameter to `{\"name\": \"<insert-function-name>\"}`. If a function is used, the output will contain `\"finish_reason\": \"function_call\"` in the response, as well as a `function_call` object that has the name of the function and the generated function arguments.\n",
"\n", "\n",
"Functions are specified with the following fields:\n", "Functions are specified with the following fields:\n",
"\n", "\n",