Interface ITypeSafeClient
Client for the TypeSafe AI API.
public interface ITypeSafeClient
Properties
BaseUrl
API root with trailing slashes removed.
string BaseUrl { get; }
Property Value
DefaultModel
Model used when a request omits model.
string DefaultModel { get; }
Property Value
LogLevel
Configured log verbosity.
TypeSafeLogLevel LogLevel { get; }
Property Value
Models
The models available to the account.
ModelsResource Models { get; }
Property Value
Retry
Retry settings with constructor overrides applied.
RetryPolicy Retry { get; }
Property Value
TimeoutMs
Timeout per attempt in milliseconds.
int TimeoutMs { get; }
Property Value
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
stateobjectquestionsIDictionary<string, Question>modelstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
Returns
SystemOneAsync(SystemOneRequest, RequestOptions?, CancellationToken)
Answer named questions about text or structured state.
Task<SystemOneResult> SystemOneAsync(SystemOneRequest request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestSystemOneRequestoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
stateobjectquestionsIDictionary<string, Question>modelstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
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
Returns
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
requestSystemOneRequestoptionsRequestOptionscancellationTokenCancellationToken