.NET API
OpenAILiveProviderExtensions
Tracon.OpenAI.dllExtensions that add OpenAI’s live voice provider to the Tracon chain.
public static class OpenAILiveProviderExtensionsInheritance
Section titled “Inheritance”object ← OpenAILiveProviderExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This is a separate call, not a flag on UseOpenAI.
It opens an outbound connection that is billed by the second, and an application
must opt into that explicitly rather than inherit it from an unrelated call. The
separation also makes the 501 the endpoints return diagnosable: it says
which call is missing.
The API key is reused from OpenAIProviderOptions, so
UseOpenAI(...) must be called first. The validator says so by name if it
is not.
Methods
Section titled “Methods”UseOpenAILive(ITraconBuilder, IConfiguration)
Section titled “ UseOpenAILive(ITraconBuilder, IConfiguration)”Adds the OpenAI live voice provider, reading settings from configuration.
public static ITraconBuilder UseOpenAILive(this ITraconBuilder builder, IConfiguration configurationSection)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon chain.
configurationSection IConfiguration
The Tracon:Providers:OpenAI:Live section.
Returns
Section titled “Returns”The continuation of the chain.
Examples
Section titled “Examples”builder.AddTracon() .UseOpenAI(builder.Configuration.GetSection(OpenAIProviderOptions.SectionName)) .UseOpenAILive(builder.Configuration.GetSection(OpenAILiveOptions.SectionName)) .UseLiveVoice();Exceptions
Section titled “Exceptions”One of the parameters is null.
UseOpenAILive(ITraconBuilder)
Section titled “ UseOpenAILive(ITraconBuilder)”Adds the OpenAI live voice provider with default settings.
public static ITraconBuilder UseOpenAILive(this ITraconBuilder builder)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon chain.
Returns
Section titled “Returns”The continuation of the chain.
Exceptions
Section titled “Exceptions”builder is null.
UseOpenAILive(ITraconBuilder, Action<OpenAILiveOptions>)
Section titled “ UseOpenAILive(ITraconBuilder, Action<OpenAILiveOptions>)”Adds the OpenAI live voice provider with settings given in code.
public static ITraconBuilder UseOpenAILive(this ITraconBuilder builder, Action<OpenAILiveOptions> configure)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon chain.
configure Action<OpenAILiveOptions>
The settings.
Returns
Section titled “Returns”The continuation of the chain.
Exceptions
Section titled “Exceptions”One of the parameters is null.