Fix splicing at the end of the list when the model list changes in the middle of the constant definition,and correcting a error word #4332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复当模型列表更改在常量定义的中间时,会拼接在列表尾部,比如我旧的DEFAULT_MODELS有[gpt4,gpt4-03,gpt3],此时用户已经访问过本项目,并且存储了旧的模型列表,当我在更新中给新的DEFAULT_MODELS设置为[gpt4,gpt4-03,gpt4-06,gpt3]时,用户重新访问本项目时,新的模型会拼接在列表底部,情况如下例子:
![image](https://private-user-images.githubusercontent.com/112751823/313494089-3e7ab275-6469-439e-9c8a-f01f39847c9c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDEzOTYsIm5iZiI6MTczOTU0MTA5NiwicGF0aCI6Ii8xMTI3NTE4MjMvMzEzNDk0MDg5LTNlN2FiMjc1LTY0NjktNDM5ZS05YzhhLWYwMWYzOTg0N2M5Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMzUxMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yODFiMzU5NWMxMmE1ZDljY2I0M2Q0NGMxZjY1YzUxNGM5N2E1YmQ4ODYxMDE3MTRmZDc2NjY4NzFhYTFlYjFlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.PievnYbguFphKR7SL79eY4yUlA8gHkd4SqhD_9lxK6w)
这样让用户列表变的混乱起来了
故删除相应的oldModels处理,直接使用获取到的newModels。
其他:更正了一个单词拼写错误