Table of Contents

Class OpenAiOptions

Namespace
OpenAI
Assembly
OpenAI.dll
public class OpenAiOptions
Inheritance
OpenAiOptions
Inherited Members

Constructors

OpenAiOptions()

public OpenAiOptions()

Fields

SettingKey

Setting key for Json Setting Bindings

public static readonly string SettingKey

Field Value

string

Properties

ApiKey

The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you'll use in your requests. Remember that your API key is a secret! Do not share it with others or expose it in any client-side code(browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.

public string ApiKey { get; set; }

Property Value

string

ApiVersion

Default Api Version

public string ApiVersion { get; set; }

Property Value

string

BaseDomain

Base Domain

public string BaseDomain { get; set; }

Property Value

string

Exceptions

ArgumentOutOfRangeException

DefaultEngineId

Default model id. If you are working with only one model, this will save you from few line extra code.

[Obsolete("Use Default Model Id")]
public string? DefaultEngineId { get; set; }

Property Value

string

DefaultModelId

Default model id. If you are working with only one model, this will save you from few line extra code.

public string? DefaultModelId { get; set; }

Property Value

string

DeploymentId

Azure Deployment Id

public string? DeploymentId { get; set; }

Property Value

string

Organization

For users who belong to multiple organizations, you can pass a header to specify which organization is used for an API request. Usage from these API requests will count against the specified organization's subscription quota. Organization IDs can be found on your Organization settings page.

public string? Organization { get; set; }

Property Value

string

ProviderType

Get Provider Type

public ProviderType ProviderType { get; set; }

Property Value

ProviderType

ResourceName

Azure Resource Name

public string? ResourceName { get; set; }

Property Value

string

ValidateApiOptions

public bool ValidateApiOptions { get; set; }

Property Value

bool

Methods

Validate()

Validate Settings

public void Validate()

Exceptions

ArgumentNullException