
openai
#10050
input_validation_error
Invalid format: Input does not match the required pattern. Please ensure it adheres to the allowed character set and length constraints.
This error has been identified and solved.
Reason
The error you are encountering, 'Browse graph' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'tools.0.function.name'
, indicates that the name of the function or tool you are trying to use does not comply with the expected format specified by the OpenAI API.
Specifically, the error message suggests that the name "Browse graph" contains characters (in this case, a space) that are not allowed according to the regex pattern ^[a-zA-Z0-9_-]{1,64}$
. This pattern only permits letters (both uppercase and lowercase), numbers, underscores, and hyphens, and the name must be between 1 and 64 characters long. The presence of a space in "Browse graph" violates this requirement.
Solution
To fix the error, you need to ensure the function or tool name complies with the specified format. Here are the necessary steps:
Replace the space in "Browse graph" with an allowed character, such as an underscore or a hyphen.
Ensure the name does not exceed 64 characters.
Here are some corrected versions of the name:
"Browse_graph"
"Browse-graph"
Suggested Links
https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400
https://github.com/run-llama/llama_index/issues/8853
https://community.openai.com/t/openai-badrequesterror-error-code-400-does-not-match-a-za-z0-9-1-64/709823
https://community.openai.com/t/intermittent-error-an-unexpected-error-occurred-error-code-400-error-message-this-model-does-not-support-specifying-dimensions-type-invalid-request-error-param-none-code-none/955807
https://community.openai.com/t/problem-with-required-property-when-function-calling/273635
https://community.openai.com/t/the-format-of-the-name-field-in-the-documentation-is-incorrect/175684
https://community.openai.com/t/how-to-get-the-function-name-in-realtime-api-for-a-function-call/977544
https://github.com/run-llama/llama_index/issues/9411
https://community.openai.com/t/what-is-the-best-way-to-format-the-output-of-a-function-in-the-conversation/306892