mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
💬 fix: adjust regex in ModelService to recognize o1 models
API query for OpenAI returns list of models. Their names are filtered using a regex. The regex did not yet account for model names starting with o1-
This commit is contained in:
parent
519df46e1f
commit
5da7766fad
1 changed files with 1 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ const fetchOpenAIModels = async (opts, _models = []) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (baseURL === openaiBaseURL) {
|
if (baseURL === openaiBaseURL) {
|
||||||
const regex = /(text-davinci-003|gpt-)/;
|
const regex = /(text-davinci-003|gpt-|o1-)/;
|
||||||
models = models.filter((model) => regex.test(model));
|
models = models.filter((model) => regex.test(model));
|
||||||
const instructModels = models.filter((model) => model.includes('instruct'));
|
const instructModels = models.filter((model) => model.includes('instruct'));
|
||||||
const otherModels = models.filter((model) => !model.includes('instruct'));
|
const otherModels = models.filter((model) => !model.includes('instruct'));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue