Skip to content

Commit

Permalink
default 2500 maximum length when summarizing the links
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed May 9, 2024
1 parent fad6192 commit d2d3016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/constants/appInfo.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export enum AppInfo {

export enum Search {
DEFAULT_LIMIT_SUGGESTIONS = 25,
SUMMARIZE_LINKS_MAX_LENGTH = 2500,
}

export enum I18n {
Expand Down
4 changes: 2 additions & 2 deletions client/modules/gossip.textGeneration.engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -488,7 +488,7 @@ export namespace Gossip {

try {
const pageContent = await fetchPageContent(url, {
maxLength: isRunningOnMobile ? 1750 : 3500,
maxLength: Search.SUMMARIZE_LINKS_MAX_LENGTH,
});

prompt = [
Expand Down

0 comments on commit d2d3016

Please sign in to comment.