Request always fail after the first function call finished

I am using model gpt3.5-turbo with chat completion. The following messages always fail with Error code 500

[
  {
    'role': 'system',
    'content': 'prompt xxxxx',
  },
  {
    'name': 'A',
    'content': 'A:I meet C today',
    'role': 'user'
  },
  {
    'role': 'assistant',
    'tool_calls': [
      {
        'id': 'call_PcSahIqjJoZ50L3BAAY1NmMK',
        'type': 'function',
        'function': {
          'name': 'getName',
          'arguments': '{"name":"C"}'
        }
      }
    ]
  },
  {
    'tool_call_id': 'call_PcSahIqjJoZ50L3BAAY1NmMK',
    'role': 'tool',
    'name': 'getName',
    'content': 'B does not known C'
  },
  {
    'name': 'B',
    'content': 'B: Who is C?',
    'role': 'assistant'
  },
  {
    'name': 'A',
    'content': 'A: He is a friend.',
    'role': 'user'
  }
]

I follow the function call example code at Function calling - OpenAI API

After the first function call success, the next query always fails.

openai.InternalServerError: Error code: 500 - {‘error’: {‘message’: ‘The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID req_0ebcbcfa5c98d76be4a8d73e6c550b0f in your message.)’, ‘type’: ‘server_error’, ‘param’: None, ‘code’: None}}