factor_agent.config.CampaignConfig.from_file#
- classmethod CampaignConfig.from_file(path)[source]#
Read a campaign config from YAML; the paths of
fields,operatorsandpromptsare relative to its folder.- Raises:
- TypeError
If a section holds a key its config class does not have, a segment’s entry another key than
startandend, or a role an option its backend does not take (the message lists those it does), or if the config names a budget or per-token prices.- KeyError
If a required section or role is missing.
- ValueError
If a section’s values do not fit together, or a role names an unknown backend.
- PromptError
Naming every problem of the replaced templates.