feat: Add system and quick prompts on side panel

This commit is contained in:
n4ze3m
2024-09-14 12:07:54 +05:30
parent 5602714ee2
commit 53d999a596
9 changed files with 115 additions and 31 deletions

View File

@@ -55,8 +55,6 @@ export const useMessageOption = () => {
setIsProcessing,
chatMode,
setChatMode,
speechToTextLanguage,
setSpeechToTextLanguage,
webSearch,
setWebSearch,
isSearchingInternet,
@@ -70,7 +68,10 @@ export const useMessageOption = () => {
} = useStoreMessageOption()
const currentChatModelSettings = useStoreChatModelSettings()
const [selectedModel, setSelectedModel] = useStorage("selectedModel")
const [ speechToTextLanguage, setSpeechToTextLanguage ] = useStorage(
"speechToTextLanguage",
"en-US"
)
const { ttsEnabled } = useWebUI()
const { t } = useTranslation("option")
@@ -411,8 +412,6 @@ export const useMessageOption = () => {
const prompt = await systemPromptForNonRagOption()
const selectedPrompt = await getPromptById(selectedSystemPrompt)
// message = message.trim().replaceAll("\n", " ")
let humanMessage = new HumanMessage({
content: [
{