pub fn load_from_path<P: AsRef<Path>>(path: P) -> Result<Config, AgentError>
Expand description
Load configuration from a YAML or JSON file and merge with environment variables.
The function reads the file at path
, then overlays any environment variables
prefixed with OPENAI_AGENTS_
. Environment variable names are converted to
lower‑case and underscores are replaced with dots to match the struct fields.
§Errors
Returns AgentError
if the file cannot be read, parsed, or if required fields
are missing.