mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-05 07:03:40 +02:00
update default search assistant selection (#2527)
* update default search assistant selection * update language
This commit is contained in:
@@ -139,16 +139,13 @@ export const SearchSection = ({
|
|||||||
}, []);
|
}, []);
|
||||||
const [isFetching, setIsFetching] = useState(false);
|
const [isFetching, setIsFetching] = useState(false);
|
||||||
|
|
||||||
const [validQuestionResponse, setValidQuestionResponse] =
|
|
||||||
useObjectState<ValidQuestionResponse>(VALID_QUESTION_RESPONSE_DEFAULT);
|
|
||||||
|
|
||||||
// Search Type
|
// Search Type
|
||||||
const [selectedSearchType, setSelectedSearchType] =
|
const selectedSearchType = defaultSearchType;
|
||||||
useState<SearchType>(defaultSearchType);
|
|
||||||
|
|
||||||
const [selectedPersona, setSelectedPersona] = useState<number>(
|
// If knowledge assistant exists, use it. Otherwise, use first available assistant for search.
|
||||||
assistants[0]?.id || 0
|
const selectedPersona = assistants.find((assistant) => assistant.id === 0)
|
||||||
);
|
? 0
|
||||||
|
: assistants[0]?.id;
|
||||||
|
|
||||||
// Used for search state display
|
// Used for search state display
|
||||||
const [analyzeStartTime, setAnalyzeStartTime] = useState<number>(0);
|
const [analyzeStartTime, setAnalyzeStartTime] = useState<number>(0);
|
||||||
@@ -397,7 +394,6 @@ export const SearchSection = ({
|
|||||||
|
|
||||||
setIsFetching(true);
|
setIsFetching(true);
|
||||||
setSearchResponse(initialSearchResponse);
|
setSearchResponse(initialSearchResponse);
|
||||||
setValidQuestionResponse(VALID_QUESTION_RESPONSE_DEFAULT);
|
|
||||||
setPreviousSearch(overrideMessage || query);
|
setPreviousSearch(overrideMessage || query);
|
||||||
const searchFnArgs = {
|
const searchFnArgs = {
|
||||||
query: overrideMessage || query,
|
query: overrideMessage || query,
|
||||||
|
Reference in New Issue
Block a user