mirror of
https://github.com/Mintplex-Labs/anything-llm
synced 2026-04-26 01:25:15 +02:00
OpenAI o1 model support (#2427)
* support openai o1 models * Prevent O1 use for agents getter for isO1Model; --------- Co-authored-by: timothycarambat <rambat1010@gmail.com>
This commit is contained in:
@@ -6,12 +6,19 @@ import { useTranslation } from "react-i18next";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
|
||||
// These models do NOT support function calling
|
||||
// and therefore are not supported for agents.
|
||||
function supportedModel(provider, model = "") {
|
||||
if (provider !== "openai") return true;
|
||||
return (
|
||||
["gpt-3.5-turbo-0301", "gpt-4-turbo-2024-04-09", "gpt-4-turbo"].includes(
|
||||
model
|
||||
) === false
|
||||
[
|
||||
"gpt-3.5-turbo-0301",
|
||||
"gpt-4-turbo-2024-04-09",
|
||||
"gpt-4-turbo",
|
||||
"o1-preview",
|
||||
"o1-preview-2024-09-12",
|
||||
"o1-mini",
|
||||
"o1-mini-2024-09-12",
|
||||
].includes(model) === false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user