mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00

* perf: plan tip * perf: upload size controller * feat: add image ttl index * feat: new upload file ux * remove file * feat: support read pptx * feat: support xlsx * fix: rerank docker flie
19 lines
463 B
TypeScript
19 lines
463 B
TypeScript
import { ReadFileByBufferParams, ReadFileResponse } from './type.d';
|
|
import { initMarkdownText } from './utils';
|
|
import { readFileRawText } from './rawText';
|
|
|
|
export const readMarkdown = async (params: ReadFileByBufferParams): Promise<ReadFileResponse> => {
|
|
const { teamId, metadata } = params;
|
|
const { rawText: md } = readFileRawText(params);
|
|
|
|
const rawText = await initMarkdownText({
|
|
teamId,
|
|
md,
|
|
metadata
|
|
});
|
|
|
|
return {
|
|
rawText
|
|
};
|
|
};
|