Allow images to be passed in on initial model setup without a reload

This commit is contained in:
Weves 2024-05-17 17:24:39 -07:00 committed by Chris Weaver
parent 079fdee79f
commit a4f2693819
2 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ from danswer.llm.utils import get_default_llm_tokenizer
from danswer.tools.tool import Tool
OPEN_AI_TOOL_CALLING_MODELS = {"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4"}
OPEN_AI_TOOL_CALLING_MODELS = {"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4", "gpt-4o"}
def explicit_tool_calling_supported(model_provider: str, model_name: str) -> bool:

View File

@ -3,15 +3,14 @@
import { useState, useEffect } from "react";
import { ApiKeyForm } from "./ApiKeyForm";
import { Modal } from "../Modal";
import { Divider } from "@tremor/react";
import {
FullLLMProvider,
WellKnownLLMProviderDescriptor,
} from "@/app/admin/models/llm/interfaces";
import { WellKnownLLMProviderDescriptor } from "@/app/admin/models/llm/interfaces";
import { checkLlmProvider } from "../initialSetup/welcome/lib";
import { User } from "@/lib/types";
import { useRouter } from "next/navigation";
export const ApiKeyModal = ({ user }: { user: User | null }) => {
const router = useRouter();
const [forceHidden, setForceHidden] = useState<boolean>(false);
const [validProviderExists, setValidProviderExists] = useState<boolean>(true);
const [providerOptions, setProviderOptions] = useState<
@ -63,6 +62,7 @@ export const ApiKeyModal = ({ user }: { user: User | null }) => {
<ApiKeyForm
onSuccess={() => {
router.refresh();
setForceHidden(true);
}}
providerOptions={providerOptions}