Skip to content

fix: API References links under the Modules documentation are resulting in a 500 Internal Server Error. #1754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 16, 2025

Conversation

jay0815
Copy link
Contributor

@jay0815 jay0815 commented Mar 14, 2025

Fixes: #1737

This PR fixed the issue where the mdx corresponding to API References in the documentation was not generated, and updated the documentation content based on historical code changes..

  • [✅ ] Modified typedoc.json to better match the files under packages.
  • [✅ ] Added exported content in response-synthesizer to better generate MDX.
  • [✅ ] Update incorrect documentation link paths.
  • [✅ ] Removed the unused papaparse dependency.
  • [✅ ] Updated the descriptions and examples in the documentation.
  • [✅ ] Added a script to check whether there is a corresponding MDX for the API links in the documentation.

Copy link

vercel bot commented Mar 14, 2025

@jay0815 is attempting to deploy a commit to the LlamaIndex Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Mar 14, 2025

🦋 Changeset detected

Latest commit: f67eb9a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 51 packages
Name Type
@llamaindex/readers Patch
@llamaindex/core Patch
@llamaindex/doc Patch
@llamaindex/unit-test Patch
@llamaindex/next-node-runtime-test Patch
@llamaindex/cloud Patch
@llamaindex/community Patch
llamaindex Patch
@llamaindex/node-parser Patch
@llamaindex/workflow Patch
@llamaindex/anthropic Patch
@llamaindex/clip Patch
@llamaindex/cohere Patch
@llamaindex/deepinfra Patch
@llamaindex/google Patch
@llamaindex/huggingface Patch
@llamaindex/jinaai Patch
@llamaindex/mistral Patch
@llamaindex/mixedbread Patch
@llamaindex/ollama Patch
@llamaindex/openai Patch
@llamaindex/perplexity Patch
@llamaindex/portkey-ai Patch
@llamaindex/replicate Patch
@llamaindex/vercel Patch
@llamaindex/voyage-ai Patch
@llamaindex/astra Patch
@llamaindex/azure Patch
@llamaindex/chroma Patch
@llamaindex/firestore Patch
@llamaindex/milvus Patch
@llamaindex/mongodb Patch
@llamaindex/pinecone Patch
@llamaindex/postgres Patch
@llamaindex/qdrant Patch
@llamaindex/upstash Patch
@llamaindex/weaviate Patch
@llamaindex/llama-parse-browser-test Patch
@llamaindex/cloudflare-worker-agent-test Patch
@llamaindex/next-agent-test Patch
@llamaindex/nextjs-edge-runtime-test Patch
vite-import-llamaindex Patch
@llamaindex/waku-query-engine-test Patch
@llamaindex/autotool Patch
@llamaindex/experimental Patch
@llamaindex/autotool-01-node-example Patch
@llamaindex/deepseek Patch
@llamaindex/fireworks Patch
@llamaindex/groq Patch
@llamaindex/together Patch
@llamaindex/vllm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Mar 14, 2025

Open in Stackblitz

@llamaindex/autotool

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/autotool@1754

@llamaindex/cloud

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cloud@1754

@llamaindex/community

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/community@1754

@llamaindex/core

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/core@1754

@llamaindex/env

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/env@1754

@llamaindex/experimental

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/experimental@1754

llamaindex

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/llamaindex@1754

@llamaindex/node-parser

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/node-parser@1754

@llamaindex/readers

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/readers@1754

@llamaindex/wasm-tools

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/wasm-tools@1754

@llamaindex/workflow

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/workflow@1754

@llamaindex/anthropic

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/anthropic@1754

@llamaindex/clip

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/clip@1754

@llamaindex/cohere

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/cohere@1754

@llamaindex/deepinfra

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/deepinfra@1754

@llamaindex/deepseek

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/deepseek@1754

@llamaindex/fireworks

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/fireworks@1754

@llamaindex/google

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/google@1754

@llamaindex/groq

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/groq@1754

@llamaindex/huggingface

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/huggingface@1754

@llamaindex/jinaai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/jinaai@1754

@llamaindex/mistral

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/mistral@1754

@llamaindex/mixedbread

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/mixedbread@1754

@llamaindex/ollama

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/ollama@1754

@llamaindex/openai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/openai@1754

@llamaindex/perplexity

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/perplexity@1754

@llamaindex/portkey-ai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/portkey-ai@1754

@llamaindex/replicate

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/replicate@1754

@llamaindex/together

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/together@1754

@llamaindex/vercel

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vercel@1754

@llamaindex/vllm

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/vllm@1754

@llamaindex/voyage-ai

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/voyage-ai@1754

@llamaindex/astra

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/astra@1754

@llamaindex/azure

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/azure@1754

@llamaindex/chroma

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/chroma@1754

@llamaindex/firestore

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/firestore@1754

@llamaindex/milvus

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/milvus@1754

@llamaindex/mongodb

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/mongodb@1754

@llamaindex/pinecone

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/pinecone@1754

@llamaindex/postgres

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/postgres@1754

@llamaindex/qdrant

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/qdrant@1754

@llamaindex/upstash

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/upstash@1754

@llamaindex/weaviate

npm i https://pkg.pr.new/run-llama/LlamaIndexTS/@llamaindex/weaviate@1754

commit: f67eb9a

@jay0815 jay0815 force-pushed the test-generator-logic branch from dafa294 to 467c812 Compare March 14, 2025 04:29
Copy link
Collaborator

@marcusschiesser marcusschiesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jay0815 great stuff thanks a lot!

Copy link
Member

@himself65 himself65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link

vercel bot commented Mar 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llamaindex-ts-doc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 16, 2025 6:23am

@marcusschiesser
Copy link
Collaborator

@jay0815 validate-links already runs in CI as part of the vercel build.
But this PR needs to activate it be adding the commit from https://github.com/run-llama/LlamaIndexTS/pull/1751/files

@jay0815
Copy link
Contributor Author

jay0815 commented Mar 15, 2025

@jay0815 validate-links already runs in CI as part of the vercel build. But this PR needs to activate it be adding the commit from https://github.com/run-llama/LlamaIndexTS/pull/1751/files
I will sync the latest code immediately and verify everything using validate-links. If any problem arise, I’ll discuss them with you in the PR @marcusschiesser

@jay0815
Copy link
Contributor Author

jay0815 commented Mar 15, 2025

@marcusschiesser I activated the validate script and updated the logic for generating normalized links. Now, all links in MDX pass validation.

@marcusschiesser
Copy link
Collaborator

@jay0815 unfortunately the build fails with on vercel with an out of memory error

@marcusschiesser
Copy link
Collaborator

I just checked that the build is doing
turbo build --filter=@llamaindex/doc
@himself65 I think you configured that.
Maybe just try pnpm build in the apps/next dir?

@jay0815
Copy link
Contributor Author

jay0815 commented Mar 16, 2025

@jay0815 unfortunately the build fails with on vercel with an out of memory error

image image image

I found that this OOM issue is caused by a dramatic increase in the number of files to be converted. Based on the version prior to the current PR, I conducted a detailed analysis of the newly added files and discovered that the surge mainly comes from the API file in @llamaindex/cloud, which automatically generates a large number of functions and type-aliases via OpenAPI. After excluding llamaindex/cloud/src/api.ts, the number of type-aliases dropped from 1130 to 175, which also allowed me to successfully build the project locally. I will immediately submit this change.

Additionally, I am concerned that the package-based API documentation feature I am developing might encounter similar issues, as it requires fully loading the content exposed by each package. We need to assess whether it is necessary to display the exposed type-aliases and functions under @llamaindex/cloud/api. @marcusschiesser @himself65

@jay0815 jay0815 force-pushed the test-generator-logic branch from ab4ca9f to a5b35b6 Compare March 16, 2025 05:55
@marcusschiesser marcusschiesser merged commit 21bebfc into run-llama:main Mar 16, 2025
23 checks passed
@marcusschiesser
Copy link
Collaborator

yeah! build works thanks a lot @jay0815
agree, most of the functions and type-aliases exports of @llamaindex/cloud are not necessary

@jay0815 jay0815 deleted the test-generator-logic branch March 17, 2025 08:53
@jay0815 jay0815 restored the test-generator-logic branch March 17, 2025 09:34
@jay0815 jay0815 deleted the test-generator-logic branch March 17, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Many API References under the /modules path result in a 500 Internal Server Error when accessed
3 participants