TypeSafe.Model (TypeSafe AI v0.1.0-alpha.1)

Copy Markdown View Source

A model available to the account, as listed by TypeSafe.models/1.

release_date is a DateTime when the API returns an ISO 8601 datetime (which it does today), a Date for a bare date, otherwise the raw string, so a format change upstream degrades to a string instead of a failed call.

Summary

Functions

Decodes one entry of the models array.

Types

t()

@type t() :: %TypeSafe.Model{
  description: String.t() | nil,
  name: String.t(),
  release_date: DateTime.t() | Date.t() | String.t() | nil
}

Functions

decode(raw)

@spec decode(map()) :: {:ok, t()} | :error

Decodes one entry of the models array.