Rho.Settings.File (rho v0.1.0)

Copy Markdown View Source

The default Rho.Settings: settings.json in the data dir (a missing or unreadable file means the defaults; other keys in it are kept, so a host may share the file). Each call reads the file.

  • "daily_cap": default 1.0
  • "fallback_model": none by default

Summary

Functions

Sets the daily cap in dollars (a number ≥ 0).

Sets the fallback model (a req_llm spec); nil removes it.

Functions

put_daily_cap(cap, dir \\ Rho.Config.data_dir())

@spec put_daily_cap(number(), Path.t()) :: :ok

Sets the daily cap in dollars (a number ≥ 0).

put_fallback_model(model, dir \\ Rho.Config.data_dir())

@spec put_fallback_model(String.t() | nil, Path.t()) :: :ok

Sets the fallback model (a req_llm spec); nil removes it.