Skip to main content
Weights & Biases (W&B) Weave integrates with Microsoft Azure OpenAI services, helping teams optimize their Azure AI applications. This page shows you how to start tracking calls to Azure OpenAI with Weave and points to additional resources for more advanced workflows.
For the latest tutorials, visit Weights & Biases on Microsoft Azure.

Get started

To start tracking Azure OpenAI calls with Weave, decorate the functions you want to track with weave.op. Once decorated, Weave automatically captures inputs, outputs, and metadata for each call to the function.
@weave.op()
def call_azure_chat(model_id: str, messages: list, max_tokens: int = 1000, temperature: float = 0.5):
    response = client.chat.completions.create(
        model=model_id,
        messages=messages,
        max_tokens=max_tokens,
        temperature=temperature
    )
    return {"status": "success", "response": response.choices[0].message.content}

Learn more

The following sections describe advanced Azure with Weave topics.

Use the Azure AI Model Inference API with Weave

Learn how to use the Azure AI Model Inference API with Weave to gain insights into Azure models.

Trace Azure OpenAI models with Weave

Learn how to trace Azure OpenAI models using Weave.