From cd30d192dfc4aad9fddb8734ebb4f77d366a8dab Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 28 Oct 2024 17:22:12 -0700 Subject: [PATCH] update sample --- .../sample_chat_completions_with_azure_monitor_tracing.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py index 5bb0418fea88..14b87516f7db 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py @@ -132,10 +132,9 @@ def chat_completion_with_function_call(key, endpoint): def main(): - # There is no need to pass APPLICATIONINSIGHTS_CONNECTION_STRING explicitly, - # as it is read from this environment variable by the configure_azure_monitor function - # It's provided here for clarity. - configure_azure_monitor(connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]) + # Make sure to set APPLICATIONINSIGHTS_CONNECTION_STRING environment variable before running this sample. + # Or pass the value as an argument to the configure_azure_monitor function. + configure_azure_monitor() try: endpoint = os.environ["AZURE_AI_CHAT_ENDPOINT"]