Table of Contents

Class Env

Namespace
TypeSafe.AI.Sdk
Assembly
TypeSafe.AI.Sdk.dll

Environment variable names used when constructing TypeSafeClient. Explicit constructor options take precedence over these values. Empty or whitespace-only values are ignored.

public static class Env
Inheritance
Env
Inherited Members

Fields

ApiKey

Required API key; used when ApiKey is omitted.

public const string ApiKey = "TYPESAFE_API_KEY"

Field Value

string

BaseUrl

API root; defaults to https://api.typesafe.ai.

public const string BaseUrl = "TYPESAFE_BASE_URL"

Field Value

string

DefaultModel

Default model name; defaults to jev-latest.

public const string DefaultModel = "TYPESAFE_DEFAULT_MODEL"

Field Value

string

LogLevel

Log level; defaults to warn.

public const string LogLevel = "TYPESAFE_LOG_LEVEL"

Field Value

string

Methods

FromCodeOrEnv(string?, string)

Return the explicit value, falling back to the environment.

public static string? FromCodeOrEnv(string? fromCode, string envVar)

Parameters

fromCode string
envVar string

Returns

string

Read(string)

Read a trimmed environment value, returning null for missing or blank values.

public static string? Read(string name)

Parameters

name string

Returns

string