From d2d3016e87750470ea9ffd8ced991d53fcf726f3 Mon Sep 17 00:00:00 2001 From: Pierre-Henry Soria Date: Fri, 10 May 2024 05:42:40 +1000 Subject: [PATCH] default `2500` maximum length when summarizing the links --- client/constants/appInfo.constant.ts | 1 + client/modules/gossip.textGeneration.engine.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/constants/appInfo.constant.ts b/client/constants/appInfo.constant.ts index 2c21bca..9b75ad8 100644 --- a/client/constants/appInfo.constant.ts +++ b/client/constants/appInfo.constant.ts @@ -7,6 +7,7 @@ export enum AppInfo { export enum Search { DEFAULT_LIMIT_SUGGESTIONS = 25, + SUMMARIZE_LINKS_MAX_LENGTH = 2500, } export enum I18n { diff --git a/client/modules/gossip.textGeneration.engine.ts b/client/modules/gossip.textGeneration.engine.ts index 0489191..fffa858 100644 --- a/client/modules/gossip.textGeneration.engine.ts +++ b/client/modules/gossip.textGeneration.engine.ts @@ -16,7 +16,7 @@ import { query, debug } from "./urlParams"; import toast from "react-hot-toast"; import { isRunningOnMobile } from "./mobileDetection"; import { messages } from "./messages.constants"; -import { I18n } from "../constants/appInfo.constant"; +import { AppInfo, I18n, Search } from "../constants/appInfo.constant"; export namespace Gossip { export async function prepareTextGeneration() { @@ -488,7 +488,7 @@ export namespace Gossip { try { const pageContent = await fetchPageContent(url, { - maxLength: isRunningOnMobile ? 1750 : 3500, + maxLength: Search.SUMMARIZE_LINKS_MAX_LENGTH, }); prompt = [