AiSdkServiceCollectionExtensions
Namespace: Vercel.AI
public static class AiSdkServiceCollectionExtensionsDependency injection for IAiClient.
Inheritance: object
Fields
Section titled “Fields”HttpClientName
Section titled “HttpClientName”public const string HttpClientName = "Vercel.AI"Named HTTP client used by AiSdkOptions%7d).
Value: string
Methods
Section titled “Methods”AddAiSdk(IServiceCollection, Action<AiSdkOptions>?)
Section titled “AddAiSdk(IServiceCollection, Action<AiSdkOptions>?)”public static IServiceCollection AddAiSdk(this IServiceCollection services, Action<AiSdkOptions>? configure = null)Registers IAiClient and the Gateway HTTP client.
Parameters
| Name | Type | Description |
|---|---|---|
services |
IServiceCollection | |
configure |
Action<AiSdkOptions> |
Returns: IServiceCollection
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product