Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1/n] Add load_json and load_yaml methods to AIConfigRuntime
Allow loading an AIConfigRuntime from a string. There's already a `loadJSON` method in the TS SDK. This is needed for VSCode extension (top of stack), which gets the state of the document from the editor (and which can contain unsaved changes that aren't present on the filesystem). Test Plan: Tested out getting started ipynb with: load JSON: ``` config = AIConfigRuntime.load('travel.aiconfig.json') ``` load YAML: ``` config.save('travel.aiconfig.yaml', mode="yaml") yaml_str = "" with open('travel.aiconfig.yaml') as file: yaml_str = file.read() config = AIConfigRuntime.load_yaml(yaml_str) ``` Made sure config runtime is valid and tried `config.run`
- Loading branch information