diff --git a/client/components/AiResponse/ChatInterface.tsx b/client/components/AiResponse/ChatInterface.tsx index ac675fd7..2505f2f0 100644 --- a/client/components/AiResponse/ChatInterface.tsx +++ b/client/components/AiResponse/ChatInterface.tsx @@ -21,7 +21,6 @@ import { chatGenerationStatePubSub, chatInputPubSub, followUpQuestionPubSub, - getSettings, imageSearchResultsPubSub, queryPubSub, settingsPubSub, @@ -34,6 +33,7 @@ import { import { generateRelatedSearchQuery } from "@/modules/relatedSearchQuery"; import { searchImages, searchText } from "@/modules/search"; import { generateChatResponse } from "@/modules/textGeneration"; +import { searchResultsToConsider } from "@/modules/textGenerationUtilities"; import type { ChatMessage } from "@/modules/types"; import ChatHeader from "./ChatHeader"; import ChatInputArea from "./ChatInputArea"; @@ -298,7 +298,7 @@ export default function ChatInterface({ ); updateLlmTextSearchResults( - freshResults.slice(0, getSettings().searchResultsToConsider), + freshResults.slice(0, searchResultsToConsider), ); if (uniqueFreshResults.length > 0) { diff --git a/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx b/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx index 625bdea0..7b44f22b 100644 --- a/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx +++ b/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx @@ -1,8 +1,7 @@ -import { Select, Slider, Stack, Switch, Text, TextInput } from "@mantine/core"; +import { Select, Stack, Switch, Text, TextInput } from "@mantine/core"; import { useForm } from "@mantine/form"; import { notifications } from "@mantine/notifications"; import { usePubSub } from "create-pubsub/react"; -import { useMemo } from "react"; import { requestNotificationPermission } from "@/modules/notifications"; import { settingsPubSub } from "@/modules/pubSub"; import { inferenceTypes } from "@/modules/settings"; @@ -25,15 +24,6 @@ export default function AISettingsForm() { onValuesChange: setSettings, }); - const searchResultsToConsiderSliderMarks = useMemo( - () => - Array.from({ length: 7 }, (_, index) => ({ - value: index, - label: index.toString(), - })), - [], - ); - const handleNotificationToggle = async ( event: React.ChangeEvent, ) => { @@ -75,21 +65,6 @@ export default function AISettingsForm() { description="Show a browser notification when the AI response is ready. Useful for longer queries that take time to process." /> - - Search results to consider - - Determines the number of search results to consider when - generating AI responses. A higher value may enhance accuracy, but - it will also increase response time. - - - -