Closed barakplasma closed 1 month ago
This one liner generates the format needed to copy/paste into the config.yml in the models section
curl https://integrate.api.nvidia.com/v1/models | jq '[{name: .data[].id}]'
the results can be pasted into config.yml
like so
- type: openai-compatible
name: nim
models: [
{
"name": "01-ai/yi-large"
},
{
"name": "abacusai/dracarys-llama-3.1-70b-instruct"
}
]
api_base: https://integrate.api.nvidia.com/v1
api_key: nvapi-...
We will not support this feature.
The model list from /v1/models
only contains the name field. The model list includes a mix of chat, embedding, and reranker models that need to be distinct. AIChat cannot use them directly.
Thanks for the explanation, it makes sense why this issue was closed, I have a related request which delivers part of the original request:
It seems providers are slowly adopting a -latest
model name convention. Two examples:
claude-3-5-sonnet-latest
(aichat is on June 24 release, -latest
uses Oct release)chatgpt-4o-latest
(already available in aichat)Add the -latest
model where possible, this makes it easier to use/try out updated models without requiring a aichat update.
Is your feature request related to a problem? Please describe.
I'm frustrated by needing to add new models by hand in the hours after new models are released.
Describe the solution you'd like
I'd like a new command for adding all the models supported by my API key for a given openai-compatible service. For example:
aichat --update-models
which would GET the openai-compatible API/v1/models
available to a given API KEY and transform them to add more models to the models.yml or config.yml .The following request works on the API_BASE for openai, Mistral, Nvidia nim, groq, etc.
returns:
for Mistral it even includes a bit more detail:
for groq:
for Nvidia, doesn't even require an API KEY
It would be great for aichat to take the results and update it's own models.yml or config.yaml with the given id's.
Describe alternatives you've considered
I can always patch / add model names by hand, but it seems like a waste of time. Sometimes I can update to the latest version of aichat to get the new models.yml which also works well.
Additional context
I could write a PR for this if interested. Or provide a script outside of aichat to update config.yml . Also happy for someone else to implement it.