Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to semantic search on web + slack #387

Merged
merged 1 commit into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/danswer/bots/slack/handlers/handle_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _get_answer(question: QuestionRequest) -> QAResponse:
QuestionRequest(
query=msg,
collection=DOCUMENT_INDEX_NAME,
use_keyword=None,
use_keyword=False, # always use semantic search when handling slack messages
filters=None,
offset=None,
)
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default async function Home() {
storedSearchType !== undefined &&
SearchType.hasOwnProperty(storedSearchType)
? (storedSearchType as SearchType)
: SearchType.AUTOMATIC; // default to automatic
: SearchType.SEMANTIC; // default to semantic

return (
<>
Expand Down
13 changes: 0 additions & 13 deletions web/src/components/search/SearchTypeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ export const SearchTypeSelector: React.FC<Props> = ({
<div
className={
defaultStyle +
(selectedSearchType === SearchType.AUTOMATIC
? "bg-blue-500"
: "bg-gray-800 hover:bg-gray-600")
}
onClick={() => setSelectedSearchType(SearchType.AUTOMATIC)}
>
Auto
</div>

<div
className={
defaultStyle +
"ml-2 " +
(selectedSearchType === SearchType.SEMANTIC
? "bg-blue-500"
: "bg-gray-800 hover:bg-gray-600")
Expand Down
Loading