ModelClient

Namespace: Daisi.SDK.Clients.V1.Orc

Inheritance: ModelsProto.ModelsProtoClient

Factory

var factory = new ModelClientFactory(clientKeyProvider);
var modelClient = factory.Create();
OR using our quick start
var factory = new ModelClientFactory();
var modelClient = factory.Create();

Methods

  • GetRequiredModels() - returns GetRequiredModelsResponse.
var getRequiredModelsResponse = modelClient.GetRequiredModels();

// or async

var getRequiredModelsResponseAsync = await modelClient.GetRequiredModelsAsync();

ModelClient Usage

Example for ModelClient:

// Always use the Factory Pattern
var modelClientFactory = new ModelClientFactory();
var modelClient = new modelClientFactory.Create();

// Use modelClient to retrieve or manage models
var modelResponse = await modelClient.GetModelsAsync();

// Process modelResponse

Using ModelClient with Dependency Injection

Example in a Blazor component (non-executable):

// At the top of your Blazor component file:
@inject Daisi.SDK.Clients.V1.Orc.ModelClientFactory ModelClientFactory

... Some UI Code

@code {
    private Daisi.SDK.Clients.V1.Orc.ModelClient modelClient;

    protected override void OnInitialized()
    {
        modelClient = ModelClientFactory.Create();
        // Use modelClient to retrieve or manage models
    }
}