Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bug fix][AIC-py] add missing global model settings on init
Adding prompt with a model name to a new AIConfig makes it invalid because essentially the name is a dangling foreign key to the AIConfig's global model settings mapping. Immediate fix: When we add prompt_1, also add a default global mapping entry for each registered model. Better fix: Reject updates to AIConfig that would make it invalid. (inside add_prompt). However, this could break existing code that adds a prompt and then immediately adds the missing model, like we're doing in this PR. In the future, we should make AIConfig more constrained by definition so that this kind of invalid object can't exist to begin with. Test: run server, type into prompt_1, it runs
- Loading branch information