import { CreateSnippetParams } from '../services/SnippetService'; import { Document } from '../services/DocumentService'; import { SRTLine } from '../interfaces/SRTLine'; /** * DO NOT CHANGE THIS VALUE * * It is used to compute the document segments in the database * and will break the embeddings if improperly changed. * * TODO: Figure out how to safely update the documents without having * TODO: to recompute the embeddings */ export declare const MIN_TOKENS_PER_SNIPPET = 80; export declare const MAX_TOKENS_PER_SNIPPET = 200; export type HashParams = { syncId: string; documentId: string; text: string; startSeconds: number; }; declare const SnippetUtil: { link: (snippet: { type: "YouTube" | "RSS" | "WebPage" | "File"; text: string; startTime: string | null; startSeconds: number; url: string; organizationId: string; _id: string; meta: { createdAt?: number | undefined; createdBy?: string | undefined; lastUpdatedAt?: number | undefined; lastUpdatedBy?: string | undefined; }; sourceId: string; syncId: string; title: string; documentId: string; hash: string; index: number; domain?: string | undefined; lang?: string | undefined; endTime?: string | undefined; endSeconds?: number | undefined; releasedAt?: number | undefined; views?: number | undefined; pageNumber?: number | undefined; }, utms?: string[] | undefined) => string; addUTMs: (url: string, utms?: string[] | undefined) => string; hash: ({ syncId, documentId, text, startSeconds, }: HashParams) => Promise; tokensInSnippet: (snippet: CreateSnippetParams) => number; createSnippetParamsFromLines: (lines: SRTLine[], document: Document, index: number, pageNumber: number | undefined) => Promise; createSnippetParamsFromDocument: (document: Document, minTokensPerSnippet?: number, maxTokensPerSnippet?: number) => Promise; }; export default SnippetUtil;