Skip to content

Commit

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

Signed-off-by: sgurunat <[email protected]>
  • Loading branch information
sgurunat committed Nov 11, 2024
1 parent 46736cc commit 740f07a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ProductivitySuite/ui/react/src/components/FaqGen/FaqGen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { fetchEventSource } from '@microsoft/fetch-event-source'
import { notifications } from '@mantine/notifications'
import { FAQ_GEN_URL } from '../../config'
import { FileWithPath } from '@mantine/dropzone'

import { conversationSelector } from '../../redux/Conversation/ConversationSlice';
import { useAppSelector } from "../../redux/store";

const FaqGen = () => {
const [isFile, setIsFile] = useState<boolean>(false);
Expand All @@ -16,6 +17,7 @@ const FaqGen = () => {
const [value, setValue] = useState<string>('');
const [fileContent, setFileContent] = useState<string>('');
const [response, setResponse] = useState<string>('');
const { model } = useAppSelector(conversationSelector);

let messagesEnd:HTMLDivElement;

Expand Down Expand Up @@ -59,7 +61,8 @@ const FaqGen = () => {

setIsGenerating(true)
const body = {
messages: isFile ? fileContent : value
messages: isFile ? fileContent : value,
model: model
}
fetchEventSource(FAQ_GEN_URL, {
method: "POST",
Expand Down

0 comments on commit 740f07a

Please sign in to comment.