Error 400 related to size of string

openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “Invalid ‘tools[0]’: string too long. Expected a string with maximum length 64, but got a string with length 102 instead.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘tools[0]’, ‘code’: ‘string_above_max_length’}}

Any suggestions on how this could be resolved?

Carefully read the error message. It tells you which parameter, which list element in the parameter, and which property is causing the error message it shows you.

I would look in the list of tools you are sending to the API, find the first tool in the list, look at the first name parameter, and see if it is 102 letters in length, which is longer than allowed.

It is possible that you didn’t properly use matching closing quotes or some other reason why the parsing sees a long string as the function name.