Skip to content

Commit

Permalink
feature: add semantic enabled to dashboard ui
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanpunia authored and cdxker committed Jul 5, 2024
1 parent 30c6e79 commit e365e20
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
30 changes: 27 additions & 3 deletions dashboard/src/pages/Dashboard/Dataset/DatasetSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const defaultServerEnvsConfiguration: ServerEnvsConfiguration = {
EMBEDDING_SIZE: 768,
N_RETRIEVALS_TO_INCLUDE: 8,
FULLTEXT_ENABLED: true,
SEMANTIC_ENABLED: true,
QDRANT_COLLECTION_NAME: null,
EMBEDDING_QUERY_PREFIX: "Search for: ",
USE_MESSAGE_TO_QUERY_PROMPT: false,
Expand Down Expand Up @@ -442,12 +443,12 @@ export const ServerSettingsForm = () => {
type="checkbox"
name="fullTextEnabled"
id="fullTextEnabled"
checked={serverConfig().FULLTEXT_ENABLED}
checked={serverConfig().SEMANTIC_ENABLED}
onInput={(e) =>
setServerConfig((prev) => {
return {
...prev,
FULLTEXT_ENABLED: e.currentTarget.checked,
SEMANTIC_ENABLED: e.currentTarget.checked,
};
})
}
Expand All @@ -456,7 +457,7 @@ export const ServerSettingsForm = () => {
for="fullTextEnabled"
class="block text-sm font-medium leading-6"
>
Fulltext Enabled
Semantic Enabled
</label>
</div>

Expand All @@ -480,6 +481,29 @@ export const ServerSettingsForm = () => {
</label>
</div>

<div class="col-span-4 flex items-center space-x-2 sm:col-span-2">
<input
type="checkbox"
name="fullTextEnabled"
id="fullTextEnabled"
checked={serverConfig().FULLTEXT_ENABLED}
onInput={(e) =>
setServerConfig((prev) => {
return {
...prev,
FULLTEXT_ENABLED: e.currentTarget.checked,
};
})
}
/>
<label
for="fullTextEnabled"
class="block text-sm font-medium leading-6"
>
Fulltext Enabled
</label>
</div>

<div class="col-span-4 flex items-center space-x-2 sm:col-span-2">
<input
type="checkbox"
Expand Down
1 change: 1 addition & 0 deletions shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface ServerEnvsConfiguration {
N_RETRIEVALS_TO_INCLUDE: number;
EMBEDDING_SIZE: number;
FULLTEXT_ENABLED: boolean;
SEMANTIC_ENABLED: boolean;
QDRANT_COLLECTION_NAME: string | null;
EMBEDDING_QUERY_PREFIX: string;
TEMPERATURE: number | null;
Expand Down

0 comments on commit e365e20

Please sign in to comment.