Skip to content

Commit

Permalink
Add 'Enabled' switch for vector services to configuration UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k committed Sep 27, 2023
1 parent 9023222 commit 6ae99c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/AppConfig/Vector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ interface Props<T> {
export function VectorConfig({ settings, onChange }: Props<VectorSettings>) {
return (
<FieldSet label="Vector Settings">

<Field label="Enabled" description="Enable vector database powered features.">
<Switch
name="enabled"
data-testid={testIds.appConfig.vectorEnabled}
defaultChecked={settings?.enabled}
checked={settings?.enabled}
onChange={e => onChange({ ...settings, enabled: e.currentTarget.checked })}
/>
</Field>

<Field label="Model" description="The model used by the embedder and for embeddings stored in the store">
<Input
width={60}
Expand Down
1 change: 1 addition & 0 deletions src/components/testIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const testIds = {
openAIKey: 'data-testid ac-openai-api-key',
openAIOrganizationID: 'data-testid ac-openai-api-organization-id',
openAIUrl: 'data-testid ac-openai-api-url',
vectorEnabled: 'data-testid ac-vector-enabled',
qdrantAddress: 'data-testid ac-qdrant-address',
qdrantSecure: 'data-testid ac-qdrant-secure',
grafanaVectorApiUrl: 'data-testid ac-grafana-vector-api-url',
Expand Down

0 comments on commit 6ae99c9

Please sign in to comment.