Skip to content

Commit

Permalink
Merge pull request Azure#1 from johnhuang01/johnhuang/12767912-addIsL…
Browse files Browse the repository at this point in the history
…ocalInference

12767912: Add isLocalInference in the public SDK
  • Loading branch information
johnhuang01 authored Dec 11, 2021
2 parents e50c091 + 5ee5791 commit f546ce5
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions sdk/personalizer/Azure.AI.Personalizer/src/Generated/RankClient.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class PersonalizerClient
{
private readonly ClientDiagnostics _clientDiagnostics;
private readonly HttpPipeline _pipeline;
private readonly bool _isLocalInference;
internal RankRestClient RankRestClient { get; set; }
internal EventsRestClient EventsRestClient { get; set; }
internal MultiSlotRestClient MultiSlotRestClient { get; set; }
Expand Down Expand Up @@ -52,6 +53,17 @@ public PersonalizerClient(Uri endpoint, TokenCredential credential, Personalizer
MultiSlotEventsRestClient = new MultiSlotEventsRestClient(_clientDiagnostics, _pipeline, stringEndpoint);
}

/// <summary> Initializes a new instance of PersonalizerClient. </summary>
/// <param name="endpoint"> Supported Cognitive Services endpoint. </param>
/// <param name="credential"> A credential used to authenticate to an Azure Service. </param>
/// <param name="isLocalInference"> A flag to determine whether to use local inference. </param>
/// <param name="options"> The options for configuring the client. </param>
public PersonalizerClient(Uri endpoint, TokenCredential credential, bool isLocalInference, PersonalizerClientOptions options = null) :
this(endpoint, credential, options)
{
_isLocalInference = isLocalInference;
}

/// <summary> Initializes a new instance of PersonalizerClient. </summary>
/// <param name="endpoint"> Supported Cognitive Services endpoint. </param>
/// <param name="credential"> A credential used to authenticate to an Azure Service. </param>
Expand Down Expand Up @@ -82,6 +94,17 @@ public PersonalizerClient(Uri endpoint, AzureKeyCredential credential, Personali
MultiSlotEventsRestClient = new MultiSlotEventsRestClient(_clientDiagnostics, _pipeline, stringEndpoint);
}

/// <summary> Initializes a new instance of PersonalizerClient. </summary>
/// <param name="endpoint"> Supported Cognitive Services endpoint. </param>
/// <param name="credential"> A credential used to authenticate to an Azure Service. </param>
/// <param name="isLocalInference"> A flag to determine whether to use local inference. </param>
/// <param name="options"> The options for configuring the client. </param>
public PersonalizerClient(Uri endpoint, AzureKeyCredential credential, bool isLocalInference, PersonalizerClientOptions options = null) :
this(endpoint, credential, options)
{
_isLocalInference = isLocalInference;
}

/// <summary> Initializes a new instance of PersonalizerClient. </summary>
/// <param name="endpoint"> Supported Cognitive Services endpoint. </param>
/// <param name="credential"> A credential used to authenticate to an Azure Service. </param>
Expand Down

0 comments on commit f546ce5

Please sign in to comment.