Skip to content

TypeSafeServiceCollectionExtensions

Namespace: TypeSafe.AI.Sdk.DependencyInjection

public static class TypeSafeServiceCollectionExtensions

Dependency-injection helpers for TypeSafeClient.

Inheritance: object

View source

AddTypeSafeClient(IServiceCollection, Action<TypeSafeClientOptions>?)

Section titled “AddTypeSafeClient(IServiceCollection, Action<TypeSafeClientOptions>?)”
public static IHttpClientBuilder AddTypeSafeClient(this IServiceCollection services, Action<TypeSafeClientOptions>? configure = null)

Register ITypeSafeClient / TypeSafeClient using IHttpClientFactory. Configuration still reads TYPESAFE_API_KEY and the other Env variables when options omit them.

Parameters

Name Type Description
services IServiceCollection
configure Action<TypeSafeClientOptions>

Returns: IHttpClientBuilder

View source

MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API