From 6f0783e7bdbaef537db49f2b452d73968453eb75 Mon Sep 17 00:00:00 2001 From: sgurunat Date: Mon, 11 Nov 2024 14:05:14 +0000 Subject: [PATCH] ProductivitySuite UI: Add model parameter for Codegen so that it works with vLLM Signed-off-by: sgurunat --- .../ui/react/src/components/CodeGen/CodeGen.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ProductivitySuite/ui/react/src/components/CodeGen/CodeGen.tsx b/ProductivitySuite/ui/react/src/components/CodeGen/CodeGen.tsx index 1811b1bf0..497ca0d01 100644 --- a/ProductivitySuite/ui/react/src/components/CodeGen/CodeGen.tsx +++ b/ProductivitySuite/ui/react/src/components/CodeGen/CodeGen.tsx @@ -8,7 +8,8 @@ import { IconArrowRight } from '@tabler/icons-react' import { ConversationMessage } from '../Message/conversationMessage' import { fetchEventSource } from '@microsoft/fetch-event-source' import { CODE_GEN_URL } from '../../config' - +import { conversationSelector } from '../../redux/Conversation/ConversationSlice'; +import { useAppSelector } from "../../redux/store"; const CodeGen = () => { @@ -17,6 +18,7 @@ const CodeGen = () => { const [response,setResponse] = useState(""); const promptInputRef = useRef(null) const scrollViewport = useRef(null) + const { model } = useAppSelector(conversationSelector); const toSend = "Enter" @@ -24,7 +26,8 @@ const CodeGen = () => { setResponse("") setSubmittedPrompt(prompt) const body = { - messages:prompt + messages:prompt, + model: model } fetchEventSource(CODE_GEN_URL, { method: "POST",