Packages

The official Elixir client for Replicate. It lets you run models from your Elixir code, and everything else you can do with Replicate's HTTP API.

Current section

Files

Jump to
replicate lib client behaviour.ex
Raw

lib/client/behaviour.ex

defmodule Replicate.Client.Behaviour do
@moduledoc """
Documentation for the Client Behaviour
"""
alias Replicate.Predictions.Prediction
@callback request(method :: atom(), path :: String.t()) ::
{:ok, String.t()} | {:error, String.t()}
@callback request(method :: atom(), path :: String.t(), body :: map()) ::
{:ok, String.t()} | {:error, String.t()}
@callback wait({:ok, Prediction.t()}) :: {:ok, Prediction.t()} | {:error, String.t()}
end