Skip to content

statsig-io/azureai-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statsig Azure AI

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 dotnet add package StatsigAzureAI
  2. Initialize the main AzureAI interface along with the internal Statsig service
using Statsig;
using Statsig.AzureAI;
var options = new StatsigOptions(environment: new StatsigEnvironment(EnvironmentTier.Development));
await Server.Initialize(<STATSIG_SERVER_KEY>, options);
  1. Create the AzureAI inference client
var client = Server.GetModelClientFromEndpoint(
    <DEPLOYMENT_ENDPOINT_URL>,
    <DEPLOYMENT_KEY>
);

Optionally, use a Statsig Dynamic Config to provide default configurations

var client = Server.GetModelClient("azureai_model", <DEPLOYMENT_ENDPOINT_URL>, <DEPLOYMENT_KEY>);
  1. Call the API
var completion = await client.Complete(
    "You are a helpful assistant that speaks like a pirate",
    "How do you train a parrot in 10 easy steps?"
);

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages