Customize model responses to function outputs is not working due to 'function' role validation error
Hong Yong Ching
0
Reputation points
From the February news, it stated that fine-tuning with function calling is now supported. I tried to follow the docs and import the sample data by following the document, which is not working at all.
{
"messages": [
{"role": "user", "content": "What is the weather in San Francisco?"},
{"role": "assistant", "function_call": {"name": "get_current_weather", "arguments": "{\"location\": \"San Francisco, USA\", \"format\": \"celcius\"}"}}
{"role": "function", "name": "get_current_weather", "content": "21.0"},
{"role": "assistant", "content": "It is 21 degrees celsius in San Francisco, CA"}
],
"functions": [...] // same as before
}
Currently importing data consisting role function
causing the following error.
Validation of jsonl file failed: Role must be either 'user', 'assistant', or 'system'. Unexpected value encountered on line 0. Please fix the data and try again.
For more details, refer to the documentation at: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/fine-tuning?tabs=turbo%2Cpython&pivots=programming-language-python#prepare-your-training-and-validation-data
remove or simply change the function
role from below line to 'user', 'assistant', or 'system' works very well, but it is not how the function calling work.
{"role": "function", "name": "get_current_weather", "content": "21.0"}
Is the fine-tuning on function calling response officially supported? Or am I getting anything wrong here?
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,080 questions
Sign in to answer