OpenAIServiceCollectionExtensions.AddOpenAIAudioToText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddOpenAIAudioToText(IServiceCollection, String, OpenAIClient, String) |
Adds the OpenAI audio-to-text service to the list. |
AddOpenAIAudioToText(IServiceCollection, String, String, String, String) |
Adds the OpenAI audio-to-text service to the list. |
AddOpenAIAudioToText(IServiceCollection, String, OpenAIClient, String)
Adds the OpenAI audio-to-text service to the list.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOpenAIAudioToText (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string modelId, OpenAI.OpenAIClient? openAIClient = default, string? serviceId = default);
static member AddOpenAIAudioToText : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * OpenAI.OpenAIClient * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOpenAIAudioToText (services As IServiceCollection, modelId As String, Optional openAIClient As OpenAIClient = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection instance to augment.
- modelId
- String
OpenAI model id
- openAIClient
- OpenAI.OpenAIClient
OpenAI.OpenAIClient to use for the service. If null, one must be available in the service provider when this service is resolved.
- serviceId
- String
A local identifier for the given AI service
Returns
The same instance as services
.
Applies to
AddOpenAIAudioToText(IServiceCollection, String, String, String, String)
Adds the OpenAI audio-to-text service to the list.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOpenAIAudioToText (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string modelId, string apiKey, string? orgId = default, string? serviceId = default);
static member AddOpenAIAudioToText : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOpenAIAudioToText (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
- apiKey
- String
OpenAI API key, see https://platform.openai.com/account/api-keys
- 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
.