ApiConfig

com.alecdorrington.iris.api.ApiConfig
See theApiConfig companion object
final case class ApiConfig(key: Option[String] = ..., baseUrl: Option[String] = ..., timeout: FiniteDuration = ..., maxRetries: Int = ..., backoff: FiniteDuration = ..., patience: FiniteDuration = ...)

How a provider's API is reached: the defaults every request takes.

Value parameters

backoff

The wait before sending a request again where the provider asks for none, doubling each time, less up to half at random, and else added up to once at random to the wait it asks for.

baseUrl

The origin to send requests to, or None for the provider's own.

key

The API key, or None for the provider's own environment variable, such as ANTHROPIC_API_KEY, read when a service is made.

maxRetries

The most times a request is sent again after the first, where the provider refuses or fails it for now: 0 sends each once.

patience

The longest a request is waited out in all, after which its last refusal is given.

timeout

The longest a request is waited for: a whole response from sending it to reading it, and each next part of a streamed one.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def toString: String

The configuration, its key redacted, so that hosts may log it.

The configuration, its key redacted, so that hosts may log it.

Attributes

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product