i noticed some inconsistency in the tool call recently,
{
"type": "function",
"function": {
"name": "verify_user",
"description": "requires user to input their account number",
"parameters": {
"type": "object",
"properties": {
"account_number": {
"description": "the user's account number",
"type": "string"
}
},
"required": [
"account_number"
]
}
}
until yesterday, the model always ask the user for their account number, now, it assume that it already know the account number and filling a default either:
function args {‘account_number’: ‘xxxxxx’}
or
function args {‘account_number’: ‘123456’}
i tried gpt-4-turbo to test and seems to be working fine
I have the same issue, I assume. When i started feeding to the chat model some data, it understands it, but runs the tool several times and then stops due to large number of agent execution. It fetches ok though from the chat itself. I am using langchain. But when i changed the model from o to turbo - all worked. The 4o still is handling prompts ok and provides the desired more less output via promps, but fails with functions. I think it is a bug on OpenAI site, they claim to have 4o as the more stable and the latest, but in reality turbo works better and way more stable. This issue I have seen before from time to time, but from 30.08 it is consistent and even forced me to re-write the code today 2 hours before presentation. Is there any intentional degradation of the model?
The error you’re encountering likely results from an issue in your implementation where the function declaration is either being misused or incorrectly formatted in the context where it’s being called or defined. Here’s a breakdown of what might be causing the problem and how to fix it:
Potential Issues:
Misplacement in the Code: The function might be placed or called in a context where it’s not allowed or doesn’t make sense. For instance, it might be defined inside another function or an inappropriate block of code.
Incorrect JSON Formatting: If this snippet is part of a larger JSON object or a configuration file, the JSON structure around it may be incorrect, such as missing or extra commas, brackets, or braces.
Usage Context: If this is meant to be an inline function definition in a scripting language or environment that doesn’t support such syntax, you’ll get an error. This could happen if you’re trying to define the function in a place where only expressions or certain kinds of statements are allowed.
Execution Environment: The environment where you’re running this code might not support this kind of function definition. Some environments require functions to be defined in specific ways.
How to Fix:
Review the Placement: Ensure that the function is defined in an appropriate place in your code, typically at the global level or within a proper function scope.
Check the JSON Structure: If this is part of a larger JSON object, validate the JSON structure to make sure it’s correctly formatted. Use an online JSON validator to ensure that the structure is correct.
Appropriate Syntax: If you’re working within a specific environment (e.g., JavaScript, Python, etc.), make sure that you are using the correct syntax for defining and calling functions in that environment.
Check the Function Call: If this is a callable function within a larger script or program, ensure that the function is called correctly and that the environment supports the type of function definition you’re using.
Environment Compatibility: If this function is part of an API definition, ensure that the API framework or environment you’re using supports this structure and format for defining functions.
Here’s a corrected example assuming you’re working in a JavaScript or a similar environment where JSON-like syntax might be used in an API context:
{
"type": "function",
"name": "verify_user",
"description": "requires user to input their account number",
"parameters": {
"type": "object",
"properties": {
"account_number": {
"description": "the user's account number",
"type": "string"
}
},
"required": [
"account_number"
]
}
}
This is assuming you’re defining this function in the context of an API or similar JSON structure. Ensure that the surrounding context or system calling this function understands and can correctly process this definition.
I was looking at this too, I saw the structure changed, I updated to this structure but still the same issue, unless I changed to Turbo then it works however other issue also exist in turbo i.e. function to handover to human suddenly doesn’t get called.