mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 04:49:21 +02:00
default agent search on
This commit is contained in:
@@ -195,11 +195,16 @@ def validate_ccpair_for_user(
|
|||||||
db_session,
|
db_session,
|
||||||
get_editable=False,
|
get_editable=False,
|
||||||
)
|
)
|
||||||
if not credential:
|
|
||||||
raise ValueError("Credential not found")
|
|
||||||
if not connector:
|
if not connector:
|
||||||
raise ValueError("Connector not found")
|
raise ValueError("Connector not found")
|
||||||
|
|
||||||
|
if connector.source == DocumentSource.INGESTION_API:
|
||||||
|
return
|
||||||
|
|
||||||
|
if not credential:
|
||||||
|
raise ValueError("Credential not found")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
runnable_connector = instantiate_connector(
|
runnable_connector = instantiate_connector(
|
||||||
db_session=db_session,
|
db_session=db_session,
|
||||||
|
@@ -45,7 +45,7 @@ class Settings(BaseModel):
|
|||||||
gpu_enabled: bool | None = None
|
gpu_enabled: bool | None = None
|
||||||
application_status: ApplicationStatus = ApplicationStatus.ACTIVE
|
application_status: ApplicationStatus = ApplicationStatus.ACTIVE
|
||||||
anonymous_user_enabled: bool | None = None
|
anonymous_user_enabled: bool | None = None
|
||||||
pro_search_disabled: bool | None = None
|
pro_search_enabled: bool | None = None
|
||||||
|
|
||||||
temperature_override_enabled: bool = False
|
temperature_override_enabled: bool = False
|
||||||
auto_scroll: bool = False
|
auto_scroll: bool = False
|
||||||
|
@@ -240,11 +240,11 @@ export function SettingsForm() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
label="Agent Search Disabled"
|
label="Agent Search"
|
||||||
sublabel="If set, users will not be able to use Pro Search."
|
sublabel="If set, users will be able to use Agent Search."
|
||||||
checked={settings.pro_search_disabled ?? false}
|
checked={settings.pro_search_enabled ?? true}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleToggleSettingsField("pro_search_disabled", e.target.checked)
|
handleToggleSettingsField("pro_search_enabled", e.target.checked)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ export interface Settings {
|
|||||||
notifications: Notification[];
|
notifications: Notification[];
|
||||||
needs_reindexing: boolean;
|
needs_reindexing: boolean;
|
||||||
gpu_enabled: boolean;
|
gpu_enabled: boolean;
|
||||||
pro_search_disabled: boolean | null;
|
pro_search_enabled: boolean | null;
|
||||||
application_status: ApplicationStatus;
|
application_status: ApplicationStatus;
|
||||||
auto_scroll: boolean;
|
auto_scroll: boolean;
|
||||||
temperature_override_enabled: boolean;
|
temperature_override_enabled: boolean;
|
||||||
|
@@ -1339,7 +1339,7 @@ export function ChatPage({
|
|||||||
searchParams.get(SEARCH_PARAM_NAMES.SYSTEM_PROMPT) || undefined,
|
searchParams.get(SEARCH_PARAM_NAMES.SYSTEM_PROMPT) || undefined,
|
||||||
useExistingUserMessage: isSeededChat,
|
useExistingUserMessage: isSeededChat,
|
||||||
useLanggraph:
|
useLanggraph:
|
||||||
!settings?.settings.pro_search_disabled &&
|
settings?.settings.pro_search_enabled &&
|
||||||
proSearchEnabled &&
|
proSearchEnabled &&
|
||||||
retrievalEnabled,
|
retrievalEnabled,
|
||||||
});
|
});
|
||||||
|
@@ -805,13 +805,12 @@ export function ChatInputBar({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center my-auto">
|
<div className="flex items-center my-auto">
|
||||||
{retrievalEnabled &&
|
{retrievalEnabled && settings?.settings.pro_search_enabled && (
|
||||||
!settings?.settings.pro_search_disabled && (
|
<AgenticToggle
|
||||||
<AgenticToggle
|
proSearchEnabled={proSearchEnabled}
|
||||||
proSearchEnabled={proSearchEnabled}
|
setProSearchEnabled={setProSearchEnabled}
|
||||||
setProSearchEnabled={setProSearchEnabled}
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
|
||||||
<button
|
<button
|
||||||
id="onyx-chat-input-send-button"
|
id="onyx-chat-input-send-button"
|
||||||
className={`cursor-pointer ${
|
className={`cursor-pointer ${
|
||||||
|
@@ -21,11 +21,9 @@ import { fetchAssistantData } from "@/lib/chat/fetchAssistantdata";
|
|||||||
import { AppProvider } from "@/components/context/AppProvider";
|
import { AppProvider } from "@/components/context/AppProvider";
|
||||||
import { PHProvider } from "./providers";
|
import { PHProvider } from "./providers";
|
||||||
import { getCurrentUserSS } from "@/lib/userSS";
|
import { getCurrentUserSS } from "@/lib/userSS";
|
||||||
import CardSection from "@/components/admin/CardSection";
|
|
||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
import PostHogPageView from "./PostHogPageView";
|
import PostHogPageView from "./PostHogPageView";
|
||||||
import Script from "next/script";
|
import Script from "next/script";
|
||||||
import { LogoType } from "@/components/logo/Logo";
|
|
||||||
import { Hanken_Grotesk } from "next/font/google";
|
import { Hanken_Grotesk } from "next/font/google";
|
||||||
import { WebVitals } from "./web-vitals";
|
import { WebVitals } from "./web-vitals";
|
||||||
import { ThemeProvider } from "next-themes";
|
import { ThemeProvider } from "next-themes";
|
||||||
|
@@ -51,7 +51,7 @@ export async function fetchSettingsSS(): Promise<CombinedSettings | null> {
|
|||||||
notifications: [],
|
notifications: [],
|
||||||
needs_reindexing: false,
|
needs_reindexing: false,
|
||||||
anonymous_user_enabled: false,
|
anonymous_user_enabled: false,
|
||||||
pro_search_disabled: false,
|
pro_search_enabled: true,
|
||||||
temperature_override_enabled: true,
|
temperature_override_enabled: true,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@@ -95,8 +95,8 @@ export async function fetchSettingsSS(): Promise<CombinedSettings | null> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enterpriseSettings && settings.pro_search_disabled == null) {
|
if (enterpriseSettings && settings.pro_search_enabled == null) {
|
||||||
settings.pro_search_disabled = true;
|
settings.pro_search_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const webVersion = getWebVersion();
|
const webVersion = getWebVersion();
|
||||||
|
Reference in New Issue
Block a user