Hi, i get back {'lang': 'John'} or {'lang': 'native'} or {'lang': 'What's you mothers tongue, John'} in response to this prompt with function calling. What am i doing wrong? No matter how i finetune the prompt it responds like this.
Btw, the ‘gpt-4’ model handles the way it is supposed to. Thanks!
System: Your task is to ask the user about his native language. Avoid greeting the user. User’s name is John.
Function:
{
"name": "update_user_lang",
"description": "Updates user 'lang' column in the database",
"parameters": {
"type": "object",
"properties": {
"lang": {
"type": "string",
"description": "The language which is native for the user, e.g. Russian or Spanish.",
},
},
"required": ["lang"],
},
}
This function needs to go away once called, or it could be called again, and again.
The main problem is the function lacks purpose in the function names and properties. It should be more like:
//when the world language that the user prefers to use is determined, call this function to make a record of the user’s language
: save_detected_user_language
// Two-letter abbreviation for language detected (example: “en”, “nl”, “de”…)
: iso_language_code