Add /upstream endpoint (#30)

* remove catch-all route to upstream proxy (it was broken anyways)
* add /upstream/:model_id to swap and route to upstream path
* add /upstream HTML endpoint and unlisted option
* add /upstream endpoint to show a list of available models
* add `unlisted` configuration option to omit a model from /v1/models and /upstream lists
* add favicon.ico
This commit is contained in:
Benson Wong
2024-12-17 14:37:44 -08:00
committed by GitHub
parent 7183f6b43d
commit 891f6a5b5a
7 changed files with 78 additions and 22 deletions

View File

@@ -16,6 +16,7 @@ type ModelConfig struct {
Env []string `yaml:"env"`
CheckEndpoint string `yaml:"checkEndpoint"`
UnloadAfter int `yaml:"ttl"`
Unlisted bool `yaml:"unlisted"`
}
func (m *ModelConfig) SanitizedCommand() ([]string, error) {