LLMProxy.Config.TOML (llm_proxy v0.1.0)

Copy Markdown View Source

TOML decoder for standalone LLMProxy configuration files.

The decoder keeps TOML as data and translates only the supported top-level shapes into ordinary :llm_proxy application configuration keys. It does not create atoms from arbitrary TOML keys.

Summary

Types

decoded()

@type decoded() :: [providers: map(), models: [map()]]

reason()

@type reason() :: Toml.reason()

Functions

decode(input, opts \\ [])

@spec decode(
  String.t(),
  keyword()
) :: {:ok, decoded()} | {:error, reason()}

decode_file(path, opts \\ [])

@spec decode_file(
  Path.t(),
  keyword()
) :: {:ok, decoded()} | {:error, reason()}