Skip to content

Commit

Permalink
Add azure to list of model in ModelSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
punitda committed Nov 3, 2024
1 parent 14385bd commit cd74585
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/chat-interface/model-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
FIREWORKS_MODELS,
GEMINI_MODELS,
LS_HAS_SEEN_MODEL_DROPDOWN_ALERT,
AZURE_MODELS,
} from "@/constants";
import { Dispatch, SetStateAction, useEffect, useState } from "react";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
Expand All @@ -29,6 +30,7 @@ const allModels = [
...OPENAI_MODELS,
...FIREWORKS_MODELS,
...GEMINI_MODELS,
...AZURE_MODELS,
];

const modelNameToLabel = (modelName: ALL_MODEL_NAMES) => {
Expand Down Expand Up @@ -176,6 +178,12 @@ export default function ModelSelector(props: ModelSelectorProps) {
) {
return false;
}
if (
model.name.includes("azure") &&
process.env.NEXT_PUBLIC_AZURE_ENABLED === "false"
) {
return false;
}
if (
model.name.includes("gemini-") &&
process.env.NEXT_PUBLIC_GEMINI_ENABLED === "false"
Expand Down

0 comments on commit cd74585

Please sign in to comment.