Skip to content

statsig-io/azureai-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Statsig wrapped Azure AI inference library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages