Partilhar via


HuggingFaceServiceCollectionExtensions.AddHuggingFaceImageToText Method

Definition

Overloads

AddHuggingFaceImageToText(IServiceCollection, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

AddHuggingFaceImageToText(IServiceCollection, String, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

AddHuggingFaceImageToText(IServiceCollection, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHuggingFaceImageToText(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Uri endpoint, string? apiKey = default, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddHuggingFaceImageToText : Microsoft.Extensions.DependencyInjection.IServiceCollection * Uri * string * string * System.Net.Http.HttpClient -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHuggingFaceImageToText (services As IServiceCollection, endpoint As Uri, Optional apiKey As String = Nothing, Optional serviceId As String = Nothing, Optional httpClient As HttpClient = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

endpoint
Uri

The endpoint for the image-to-text service.

apiKey
String

The API key required for accessing the Hugging Face service.

serviceId
String

A local identifier for the given AI service.

httpClient
HttpClient

The HttpClient to use with this service.

Returns

The same instance as services.

Applies to

AddHuggingFaceImageToText(IServiceCollection, String, Uri, String, String, HttpClient)

Adds an Hugging Face image-to-text service with the specified configuration.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHuggingFaceImageToText(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string model, Uri? endpoint = default, string? apiKey = default, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddHuggingFaceImageToText : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Uri * string * string * System.Net.Http.HttpClient -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHuggingFaceImageToText (services As IServiceCollection, model As String, Optional endpoint As Uri = Nothing, Optional apiKey As String = Nothing, Optional serviceId As String = Nothing, Optional httpClient As HttpClient = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection instance to augment.

model
String

The name of the Hugging Face model.

endpoint
Uri

The endpoint for the image-to-text service.

apiKey
String

The API key required for accessing the Hugging Face service.

serviceId
String

A local identifier for the given AI service.

httpClient
HttpClient

The HttpClient to use with this service.

Returns

The same instance as services.

Applies to