Skip to content

Commit

Permalink
ProductivitySuite UI: Add model parameter for Codegen so that it work…
Browse files Browse the repository at this point in the history
…s with vLLM

Signed-off-by: sgurunat <[email protected]>
  • Loading branch information
sgurunat committed Nov 11, 2024
1 parent adaa85d commit 6f0783e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ProductivitySuite/ui/react/src/components/CodeGen/CodeGen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -17,14 +18,16 @@ const CodeGen = () => {
const [response,setResponse] = useState<string>("");
const promptInputRef = useRef<HTMLTextAreaElement>(null)
const scrollViewport = useRef<HTMLDivElement>(null)
const { model } = useAppSelector(conversationSelector);

const toSend = "Enter"

const handleSubmit = async () => {
setResponse("")
setSubmittedPrompt(prompt)
const body = {
messages:prompt
messages:prompt,
model: model
}
fetchEventSource(CODE_GEN_URL, {
method: "POST",
Expand Down

0 comments on commit 6f0783e

Please sign in to comment.