GoogleProviderExtensions
AgentPrism.Google.dllExtensions that add the Google Gemini provider to the AgentPrism chain.
public static class GoogleProviderExtensionsInheritance
Section titled “Inheritance”object ← GoogleProviderExtensions
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()
Methods
Section titled “Methods”UseGoogle(IAgentPrismBuilder, string, Action<GoogleProviderOptions>?)
Section titled “ UseGoogle(IAgentPrismBuilder, string, Action<GoogleProviderOptions>?)”Adds the Google provider by giving an API key.
public static IAgentPrismBuilder UseGoogle(this IAgentPrismBuilder builder, string apiKey, Action<GoogleProviderOptions>? configure = null)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
AgentPrism chain.
apiKey string
Gemini Developer API key.
configure Action<GoogleProviderOptions>?
Additional settings changer.
Returns
Section titled “Returns”The chain, for further configuration.
Remarks
Section titled “Remarks”builder.AddAgentPrism() .UseGoogle(builder.Configuration["Google:ApiKey"]!);Exceptions
Section titled “Exceptions”builder is null.
apiKey is empty.
UseGoogle(IAgentPrismBuilder, IConfiguration)
Section titled “ UseGoogle(IAgentPrismBuilder, IConfiguration)”Adds the Google provider, reading settings from the
AgentPrism:Providers:Google section.
public static IAgentPrismBuilder UseGoogle(this IAgentPrismBuilder builder, IConfiguration configurationSection)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
AgentPrism chain.
configurationSection IConfiguration
Section to read settings from. Typically
configuration.GetSection(GoogleProviderOptions.SectionName).
Returns
Section titled “Returns”The chain, for further configuration.
Exceptions
Section titled “Exceptions”One of the parameters is null.
UseGoogle(IAgentPrismBuilder, Action<GoogleProviderOptions>)
Section titled “ UseGoogle(IAgentPrismBuilder, Action<GoogleProviderOptions>)”Adds the Google provider by giving settings in code.
public static IAgentPrismBuilder UseGoogle(this IAgentPrismBuilder builder, Action<GoogleProviderOptions> configure)Parameters
Section titled “Parameters”builder IAgentPrismBuilder
AgentPrism chain.
configure Action<GoogleProviderOptions>
Settings changer.
Returns
Section titled “Returns”The chain, for further configuration.
Remarks
Section titled “Remarks”This call registers a single provider: GoogleProviderNames.Google.
Registration uses AddModelProvider(...); no existing service is
replaced. When called more than once, settings are
merged; the provider is registered only once.
Exceptions
Section titled “Exceptions”One of the parameters is null.