code: def test_live_run_streaming(self):
      class Callback:
          def __init__(self):
              self.responses = ""
              self.counter = 0
  
          def __call__(self, chunk: StreamingChunk) -> None:
              self.counter += 1
              self.responses += chunk.content if chunk.content else ""
  
      callback = Callback()
      component = OpenAIGenerator(
          os.environ.get("OPENAI_API_KEY"), streaming_callback=callback
      )
      results = component.run("What's the capital of France?")
  
      assert len(results["replies"]) == 1
      assert len(results["meta"]) == 1
      response: str = results["replies"][0]
      assert "Paris" in response
  
      metadata = results["meta"][0]
  
      assert "gpt-3.5" in metadata["model"]
      assert metadata["finish_reason"] == "stop"
  
      # unfortunately, the usage is not available for streaming calls
      # we keep the key in the metadata for compatibility
      assert "usage" in metadata and len(metadata["usage"]) == 0
  
      assert callback.counter > 1
      assert "Paris" in callback.responses
  
imports: import os
  from typing import List
  import pytest
  from openai import OpenAIError
  from haystack.components.generators import OpenAIGenerator
  from haystack.components.generators.utils import default_streaming_callback
  from haystack.dataclasses import StreamingChunk, ChatMessage
label_desc: Use image node_id 15 for calling the TestOpenAIGenerator obj's underlying member method code with example usage: obj.test_live_run_streaming() without return types