Namespace: Daisi.SDK.Clients.V1.Host
client.SessionManager.Close() after you are done using it so that the session doesn't expire. Multiple unclosed sessions will knock your network rating.
var factory = new InferenceClientFactory();
var infClient = factory.Create();
InferenceSessionManager SessionManager get string? InferenceId getTask<CloseInferenceResponse> CloseAsync(bool closeOrcSession = true)
AsyncServerStreamingCall<SendInferenceResponse> Send(string) AsyncServerStreamingCall<SendInferenceResponse> Send(SendInferenceRequest) InferenceStatsResponse Stats(InferenceStatsRequest) // Create the factory. var infClientFactory = new InferenceClientFactory(); // Create a new Inference Session var infClient = infClientFactory.Create(); // Use CreateDefault so that you don't have to setup all of the settings manually. var sendInferenceRequest = SendInferenceRequest.CreateDefault(); sendInferenceRequest.Text = "Tell me a joke about an orc"; // Send the request to the Host. // The client determines FOC or DC. var call = infClient.Send(sendInferenceRequest); // This also works if you don't want to create the full SendInferenceRequest first. // var call = infClient.Send("Tell me a joke about an orc"); await foreach(var resp in call.ResponseStream.ReadAllAsync()) { Console.WriteLine(resp.Content); }