Partager via


OpenAIServiceCollectionExtensions.AddOpenAITextToAudio Method

Definition

Adds the OpenAI text-to-audio service to the list.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOpenAITextToAudio (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string modelId, string apiKey, string? orgId = default, string? serviceId = default);
static member AddOpenAITextToAudio : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOpenAITextToAudio (services As IServiceCollection, modelId As String, apiKey As String, Optional orgId As String = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

modelId
String

OpenAI model name, see https://platform.openai.com/docs/models

orgId
String

OpenAI organization id. This is usually optional unless your account belongs to multiple organizations.

serviceId
String

A local identifier for the given AI service

Returns

The same instance as services.

Applies to