def test_stream_chat_completion(test_params: dict):
    """Tests the basic chat completion functionality with streaming."""
    model_name = os.environ.get("AZURE_INFERENCE_MODEL", None)

    llm = AzureAICompletionsModel(model_name=model_name)

    response_stream = llm.stream_chat(**test_params)

    buffer = ""
    for chunk in response_stream:
        buffer += chunk.delta

    assert buffer.strip() == "Yes, this is a test."
Tests the basic chat completion functionality with streaming.
llama-index-integrations/llms/llama-index-llms-azure-inference/tests/test_llms_azure_inference.py