server : remove model.json endpoint (#5371)

This commit is contained in:
Alexey Parfenov 2024-02-06 18:08:38 +00:00 committed by GitHub
parent 17c97fb062
commit 213d1439fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 244 additions and 218 deletions

View file

@ -195,7 +195,8 @@ export const llamaComplete = async (params, controller, callback) => {
// Get the model info from the server. This is useful for getting the context window and so on.
export const llamaModelInfo = async () => {
if (!generation_settings) {
generation_settings = await fetch("/model.json").then(r => r.json());
const props = await fetch("/props").then(r => r.json());
generation_settings = props.default_generation_settings;
}
return generation_settings;
}