patch supported openai agent models

This commit is contained in:
timothycarambat 2024-04-18 13:36:17 -07:00
parent 91ea37d17a
commit 1ea2363969

View File

@ -5,15 +5,11 @@ import useGetProviderModels, {
// These models do NOT support function calling
function supportedModel(provider, model = "") {
if (provider !== "openai") return true;
if (model.startsWith("gpt-3.5-turbo")) return true;
switch (model) {
case "gpt-4":
case "gpt-4-turbo-preview":
case "gpt-4-32k":
return true;
default:
return false;
}
return (
["gpt-3.5-turbo-0301", "gpt-4-turbo-2024-04-09", "gpt-4-turbo"].includes(
model
) === false
);
}
export default function AgentModelSelection({