-
Notifications
You must be signed in to change notification settings - Fork 81
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
Showing
2 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters