Table of Contents

Interface ITypeSafeClient

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

Client for the TypeSafe AI API.

public interface ITypeSafeClient

Properties

BaseUrl

API root with trailing slashes removed.

string BaseUrl { get; }

Property Value

string

DefaultModel

Model used when a request omits model.

string DefaultModel { get; }

Property Value

string

LogLevel

Configured log verbosity.

TypeSafeLogLevel LogLevel { get; }

Property Value

TypeSafeLogLevel

Models

The models available to the account.

ModelsResource Models { get; }

Property Value

ModelsResource

Retry

Retry settings with constructor overrides applied.

RetryPolicy Retry { get; }

Property Value

RetryPolicy

TimeoutMs

Timeout per attempt in milliseconds.

int TimeoutMs { get; }

Property Value

int

Methods

SystemOneAsync(object?, IDictionary<string, Question>, string?, RequestOptions?, CancellationToken)

Answer named questions about text or structured state.

Task<SystemOneResult> SystemOneAsync(object? state, IDictionary<string, Question> questions, string? model = null, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

state object
questions IDictionary<string, Question>
model string
options RequestOptions
cancellationToken CancellationToken

Returns

Task<SystemOneResult>

SystemOneAsync(object?, params (string Name, Question Question)[])

Answer named questions about text or structured state. Duplicate names throw. Use the dictionary overload for model, options, or a cancellation token.

Task<SystemOneResult> SystemOneAsync(object? state, params (string Name, Question Question)[] questions)

Parameters

state object
questions (string Name, Question Question)[]

Returns

Task<SystemOneResult>

SystemOneAsync(SystemOneRequest, RequestOptions?, CancellationToken)

Answer named questions about text or structured state.

Task<SystemOneResult> SystemOneAsync(SystemOneRequest request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request SystemOneRequest
options RequestOptions
cancellationToken CancellationToken

Returns

Task<SystemOneResult>

SystemOneWithResponseAsync(object?, IDictionary<string, Question>, string?, RequestOptions?, CancellationToken)

Answer named questions and return the HTTP response metadata.

Task<TypeSafeResponse<SystemOneResult>> SystemOneWithResponseAsync(object? state, IDictionary<string, Question> questions, string? model = null, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

state object
questions IDictionary<string, Question>
model string
options RequestOptions
cancellationToken CancellationToken

Returns

Task<TypeSafeResponse<SystemOneResult>>

SystemOneWithResponseAsync(object?, params (string Name, Question Question)[])

Answer named questions and return the HTTP response metadata. Duplicate names throw. Use the dictionary overload for model, options, or a cancellation token.

Task<TypeSafeResponse<SystemOneResult>> SystemOneWithResponseAsync(object? state, params (string Name, Question Question)[] questions)

Parameters

state object
questions (string Name, Question Question)[]

Returns

Task<TypeSafeResponse<SystemOneResult>>

SystemOneWithResponseAsync(SystemOneRequest, RequestOptions?, CancellationToken)

Answer named questions and return the HTTP response metadata.

Task<TypeSafeResponse<SystemOneResult>> SystemOneWithResponseAsync(SystemOneRequest request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request SystemOneRequest
options RequestOptions
cancellationToken CancellationToken

Returns

Task<TypeSafeResponse<SystemOneResult>>