From f1ed6dff9ee14227051042ebb67c81667da57e6b Mon Sep 17 00:00:00 2001 From: thucpn Date: Mon, 9 Dec 2024 11:50:57 +0700 Subject: [PATCH] fix: comment should follow mdx --- apps/next/scripts/generate-docs.mjs | 6 ------ packages/core/src/chat-engine/context-chat-engine.ts | 3 ++- packages/readers/src/html.ts | 2 +- packages/readers/src/image.ts | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/apps/next/scripts/generate-docs.mjs b/apps/next/scripts/generate-docs.mjs index 4c79323949..8abed55a51 100644 --- a/apps/next/scripts/generate-docs.mjs +++ b/apps/next/scripts/generate-docs.mjs @@ -35,12 +35,6 @@ function transformOutput(file, content) { const fileName = path.basename(file); let title = fileName.split(".")[0]; if (title === "index") title = "LlamaIndex API Reference"; - - // FIXME: need to fix character issue in typedoc later - const excludeFiles = ["ContextChatEngine", "HTMLReader", "ImageReader"]; - if (excludeFiles.includes(title)) - return `---\ntitle: ${title}\n---\n\nEmpty Content`; - return `---\ntitle: ${title}\n---\n\n${content}`; } diff --git a/packages/core/src/chat-engine/context-chat-engine.ts b/packages/core/src/chat-engine/context-chat-engine.ts index fb2a50f651..7f260158d7 100644 --- a/packages/core/src/chat-engine/context-chat-engine.ts +++ b/packages/core/src/chat-engine/context-chat-engine.ts @@ -22,7 +22,8 @@ import type { ContextGenerator } from "./type"; /** * ContextChatEngine uses the Index to get the appropriate context for each query. - * The context is stored in the system prompt, and the chat history is chunk: ChatResponseChunk, nodes?: NodeWithScore[], nodes?: NodeWithScore[]lowing the appropriate context to be surfaced for each query. + * The context is stored in the system prompt, and the chat history is chunk, + * allowing the appropriate context to be surfaced for each query. */ export class ContextChatEngine extends PromptMixin implements BaseChatEngine { chatModel: LLM; diff --git a/packages/readers/src/html.ts b/packages/readers/src/html.ts index 3bfc2d9a56..ad90ad8d5a 100644 --- a/packages/readers/src/html.ts +++ b/packages/readers/src/html.ts @@ -13,7 +13,7 @@ export class HTMLReader extends FileReader { * Public method for this reader. * Required by BaseReader interface. * @param fileContent - The content of the file. - * @returns Promise A Promise object, eventually yielding zero or one Document parsed from the HTML content of the specified file. + * @returns `Promise` A Promise object, eventually yielding zero or one Document parsed from the HTML content of the specified file. */ async loadDataAsContent(fileContent: Uint8Array): Promise { const decoder = new TextDecoder("utf-8"); diff --git a/packages/readers/src/image.ts b/packages/readers/src/image.ts index b82d440b76..12e01acb7b 100644 --- a/packages/readers/src/image.ts +++ b/packages/readers/src/image.ts @@ -8,7 +8,7 @@ export class ImageReader extends FileReader { * Public method for this reader. * Required by BaseReader interface. * @param fileContent - The content of the file. - * @returns Promise A Promise object, eventually yielding zero or one ImageDocument of the specified file. + * @returns `Promise` A Promise object, eventually yielding zero or one ImageDocument of the specified file. */ async loadDataAsContent(fileContent: Uint8Array): Promise { const blob = new Blob([fileContent]);