Azure-OpenAI
Azure OpenAI Service integrates OpenAI’s advanced AI models, like GPT-4, with Azure’s secure cloud infrastructure, enabling businesses to enhance their applications with sophisticated language processing capabilities. It provides scalable, customizable, and enterprise-grade AI solutions while ensuring data privacy and compliance. This service leverages Azure’s reliability and security to offer powerful AI functionalities across various use cases.
Using Langtrace to monitor your Azure-OpenAI LLM is quick and easy. Follow these steps:
Setup
- Install the Langtrace and Azure-OpenAI SDKs.
Note: You’ll need API keys from Langtrace and AZURE-OPENAI SERVICE. Sign up for Langtrace and/or Azure if you haven’t done so already.
# Install the SDK
pip install -U langtrace-python-sdk openai
- Setup environment variables:
export LANGTRACE_API_KEY=YOUR_LANGTRACE_API_KEY
export AZURE_OPENAI_ENDPOINT=YOUR_AZURE_OPENAI_ENDPOINT
export AZURE_OPENAI_API_KEY=YOUR_AZURE_OPENAI_API_KEY
export AZURE_API_VERSION=YOUR_API_VERSION
export AZURE_DEPLOYMENT_NAME=YOUR_DEPLOYMENT_NAME
Usage
Generate a simple output with your deployment’s model:
You can now view your traces on the Langtrace dashboard.
Want to see more supported methods? Checkout the sample code in the Langtrace Azure-OpenAI Python Example repository.