UNPKG

aichat-core

Version:

AI 流式聊天业务核心TS模型封装及业务实现模块

18 lines (17 loc) 897 B
export default class LLMUtil { static truncateName(name: string, maxLength: number): string; static toFormData(data: any): FormData; static bytesToSize(bytes: number): { size: number; unit: string; }; static getDateDiff(startTime: string, endTime: string): string | number; static processContent(responseContent: string, think?: boolean): string; static buildThinkTitle(thinkContent: string, bAnwserOver: boolean): "已回答完毕" | "回复进行中" | "已深度思考" | "深度思考中"; static processSourceContent(responseContent: string): string; static convertTimestampToDate(timestamp?: number): string; static getTimeKey(delay?: number): number; static file2Base64(file: any): Promise<unknown>; static getBase64FromFile(file: any): Promise<unknown>; static getBase64Data(base64Str: string, format: string): string; }