Documentation
Table of Contents

Method UseOpenAI

Namespace
IntentSharp
Assembly
IntentSharp.dll

UseOpenAI(string, string?)

Uses OpenAI as the primary provider, named "OpenAI". Calling it again replaces the primary.

public IntentClientBuilder UseOpenAI(string apiKey, string? model = null)

Parameters

apiKey string
model string

Returns

IntentClientBuilder

Exceptions

ArgumentException

The fallback provider is already named "OpenAI" (for example after UseOpenAIAsFallback(string, string?)). Nothing is created.