View Source Replicate.Models.Behaviour behaviour (Replicate v1.3.0)

Documentation for the Model Behaviour

Link to this section Summary

Link to this section Callbacks

@callback get(name :: String.t()) ::
  {:ok, Replicate.Models.Model.t()} | {:error, String.t()}
@callback get!(name :: String.t()) :: Replicate.Models.Model.t()
@callback get_latest_version!(Replicate.Models.Model.t()) :: Replicate.Models.Version.t()
Link to this callback

get_version!(t, version)

View Source
@callback get_version!(Replicate.Models.Model.t(), version :: String.t()) ::
  Replicate.Models.Version.t()
@callback list() :: %{
  results: [Replicate.Models.Model.t()],
  next: String.t(),
  previous: String.t()
}
@callback list_versions(Replicate.Models.Model.t()) :: [Replicate.Models.Version.t()]