Add name and description to v1/models list (#179)

* Add support for name and description in v1/models list
* add configuration example for name and description
This commit is contained in:
Benson Wong
2025-06-30 23:02:44 -07:00
committed by GitHub
parent 3bd1b23ce0
commit c867a6c9a2
5 changed files with 73 additions and 17 deletions

View File

@@ -49,7 +49,19 @@ models:
cmd: |
# ${latest-llama} is a macro that is defined above
${latest-llama}
--model path/to/Qwen2.5-1.5B-Instruct-Q4_K_M.gguf
--model path/to/llama-8B-Q4_K_M.gguf
# name: a display name for the model
# - optional, default: empty string
# - if set, it will be used in the v1/models API response
# - if not set, it will be omitted in the JSON model record
name: "llama 3.1 8B"
# description: a description for the model
# - optional, default: empty string
# - if set, it will be used in the v1/models API response
# - if not set, it will be omitted in the JSON model record
description: "A small but capable model used for quick testing"
# env: define an array of environment variables to inject into cmd's environment
# - optional, default: empty array