gpt-35-turbo returns error messages "TypeError: 'NoneType' object is not callable"

Wenqing Zhong 0 Reputation points Microsoft Employee
2023-09-25T09:21:20.1166667+00:00

Hello team,

We are using gpt-35-turbo model in Azure open ai services. We found out that it sometimes returns things that are not completions, but seems like error messsages:

"TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'"

"TypeError: 'NoneType' object is not callable"

"TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'"

"SyntaxError: invalid syntax"

There are many kinds of errors, but it does not always reproduce. I think we just have about 1/10 change for getting error messages like this instead of normal compleitons.

Here is a prompt we used for test:

"messages": [
        {
            "role": "system",
            "content": "You are a copilot who continues to write the user's Python code from the last line. Say no other words and don't repeat it.\nExample: def add(a, =>  b):\n    return a + b"
        },
        {
            "role": "user",
            "content": "# this is function used to do mathematical calculations\\na"
        }
    ]
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,042 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.