Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.49 KB

README.md

File metadata and controls

32 lines (28 loc) · 1.49 KB

Statsig Azure AI

tests

Azure AI library with a built-in Statsig SDK.

Statsig helps you move faster with Feature Gates (Feature Flags) and Dynamic Configs. It also allows you to run A/B tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, create an account at statsig.com.

Getting Started

  1. Install the library pip install azureai-statsig
  2. Initialize the main AzureAI interface along with the internal Statsig service
AzureAI.initialize(<STATSIG_SERVER_KEY>, StatsigOptions(tier="development"))
  1. Create the AzureAI inference client
client = AzureAI.get_model_client_from_endpoint(<DEPLOYMENT_ENDPOINT_URL>, <DEPLOYMENT_KEY>)

Optionally, use a Statsig Dynamic Config to provide default configurations

client = AzureAI.get_model_client("azureai_model", <DEPLOYMENT_ENDPOINT_URL>, <DEPLOYMENT_KEY>)
  1. Call the API
response = client.complete([
    SystemMessage(content="You are a helpful assistant."),
    UserMessage(content="Give me 5 good reasons why I should exercise every day.")
])

References