Share via


OpenAIServiceCollectionExtensions.AddOpenAIFiles Method

Definition

Caution

Use OpenAI SDK or AzureOpenAI SDK clients for file operations.

[System.Obsolete("Use OpenAI SDK or AzureOpenAI SDK clients for file operations.")]
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOpenAIFiles (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string apiKey, string? orgId = default, string? serviceId = default);
[<System.Obsolete("Use OpenAI SDK or AzureOpenAI SDK clients for file operations.")>]
static member AddOpenAIFiles : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOpenAIFiles (services As IServiceCollection, apiKey As String, Optional orgId As String = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

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.

Attributes

Applies to