From 7c8692773f747f33d3b59723cc60f4fd29253940 Mon Sep 17 00:00:00 2001 From: Pierre-Henry Soria Date: Mon, 6 May 2024 04:02:29 +1000 Subject: [PATCH] Update default core search settings --- client/constants/appInfo.constant.ts | 1 + client/modules/pubSub.ts | 4 ++-- client/modules/textGeneration.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/constants/appInfo.constant.ts b/client/constants/appInfo.constant.ts index 5dd1f9c..ae4f64b 100644 --- a/client/constants/appInfo.constant.ts +++ b/client/constants/appInfo.constant.ts @@ -1,6 +1,7 @@ export enum AppInfo { APP_NAME = "Atomic Search", DEFAULT_COUNTRY_CODE = "US", + DEFAULT_LANGUAGE = "english", DEFAULT_LANGUAGE_CODE = "en", GOOGLE_FORM_WAITING_LIST_URL = "https://your-google-form-url", // Your Google Form URL } diff --git a/client/modules/pubSub.ts b/client/modules/pubSub.ts index 241b087..36b3829 100644 --- a/client/modules/pubSub.ts +++ b/client/modules/pubSub.ts @@ -2,12 +2,12 @@ import { createPubSub } from "create-pubsub"; import { SearchResults } from "./search"; const SearchOptions = { - IS_AI_RESPONSE_DISABLED: true, + IS_AI_RESPONSE_DISABLED: false, IS_WEBGPU_USAGE_DISABLED: true, // enable by default IS_LINKS_SUMMARIZED_ENABLED: true, - IS_LARGE_MODEL_ENABLED: true, + IS_LARGE_MODEL_ENABLED: false, // true =Llama, false = Gemma }; function createLocalStoragePubSub(localStorageKey: string, defaultValue: T) { diff --git a/client/modules/textGeneration.ts b/client/modules/textGeneration.ts index c56a99f..2f7f4b3 100644 --- a/client/modules/textGeneration.ts +++ b/client/modules/textGeneration.ts @@ -15,6 +15,7 @@ import { search } from "./search"; import { query, debug } from "./urlParams"; import toast from "react-hot-toast"; import { isRunningOnMobile } from "./mobileDetection"; +import { AppInfo } from "../constants/appInfo.constant"; export async function prepareTextGeneration() { if (query === null) return; @@ -30,7 +31,7 @@ export async function prepareTextGeneration() { if (searchResults.length === 0) { const queryKeywords = (await import("keyword-extractor")).default .extract(query, { - language: "english", + language: AppInfo.DEFAULT_LANGUAGE, }) .slice(0, 10);