# TypeSafe v0.2.2 - Table of Contents

> Unofficial, idiomatic Elixir client for the TypeSafe AI API.

## Pages

- [ex_typesafe_ai](readme.md)
- [Changelog](changelog.md)

## Modules

- [TypeSafe](TypeSafe.md): Elixir client for the [TypeSafe AI](https://typesafe.ai) API.
- [TypeSafe.Client](TypeSafe.Client.md): A configured TypeSafe API client.
- [TypeSafe.Config](TypeSafe.Config.md): Resolves and validates client configuration from explicit options and environment variables.

- Questions
  - [TypeSafe.Question](TypeSafe.Question.md): Questions asked about a piece of `state` in a `TypeSafe.system_one/4` request.
  - [TypeSafe.Question.Choice](TypeSafe.Question.Choice.md): A question that selects one of several named labels. Build with `TypeSafe.Question.choice/1`.

  - [TypeSafe.Question.Noul](TypeSafe.Question.Noul.md): A yes/no question. Build with `TypeSafe.Question.noul/1`.

  - [TypeSafe.Question.Score](TypeSafe.Question.Score.md): A question that rates state against an ordered rubric. Build with `TypeSafe.Question.score/1`.

- Answers
  - [TypeSafe.Answer](TypeSafe.Answer.md): Answers returned for the questions in a `TypeSafe.system_one/4` request.
  - [TypeSafe.Answer.Choice](TypeSafe.Answer.Choice.md): A choice answer.
  - [TypeSafe.Answer.Noul](TypeSafe.Answer.Noul.md): A yes/no answer. `:noul` is the probability of "yes"/true, from 0 to 1.
  - [TypeSafe.Answer.Score](TypeSafe.Answer.Score.md): A score answer.

- Responses
  - [TypeSafe.Response](TypeSafe.Response.md): Decoding of successful API responses into their public structs.
  - [TypeSafe.Response.ListModels](TypeSafe.Response.ListModels.md): The models available to the account.
  - [TypeSafe.Response.ModelMetadata](TypeSafe.Response.ModelMetadata.md): Metadata describing a single available model.
  - [TypeSafe.Response.SystemOne](TypeSafe.Response.SystemOne.md): The result of a `TypeSafe.system_one/4` call.
  - [TypeSafe.Response.Usage](TypeSafe.Response.Usage.md): Token counts for a request. Either field may be `nil` when the API does not report it.

- Errors
  - [TypeSafe.APIError](TypeSafe.APIError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.AuthenticationError](TypeSafe.AuthenticationError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.BadRequestError](TypeSafe.BadRequestError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.ConfigError](TypeSafe.ConfigError.md): Raised when SDK configuration or input is invalid before any request is sent.
  - [TypeSafe.ConnectionError](TypeSafe.ConnectionError.md): A request failed without producing an HTTP response (DNS, TCP, TLS, or read errors).
  - [TypeSafe.Error](TypeSafe.Error.md): Exception structs used by the SDK.
  - [TypeSafe.InternalServerError](TypeSafe.InternalServerError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.NotFoundError](TypeSafe.NotFoundError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.PermissionDeniedError](TypeSafe.PermissionDeniedError.md): An unsuccessful HTTP response from the TypeSafe API.
  - [TypeSafe.RateLimitError](TypeSafe.RateLimitError.md): The rate limit was exceeded (HTTP 429).
  - [TypeSafe.ResponseValidationError](TypeSafe.ResponseValidationError.md): A successful HTTP response whose body was missing or structurally invalid required data.
  - [TypeSafe.TimeoutError](TypeSafe.TimeoutError.md): A request exceeded its configured timeout.
  - [TypeSafe.UnprocessableEntityError](TypeSafe.UnprocessableEntityError.md): An unsuccessful HTTP response from the TypeSafe API.

