Skip to content

docs(zh-CN): sync LlamaHub API example#708

Open
ShawnSiao wants to merge 2 commits into
huggingface:mainfrom
ShawnSiao:docs/zh-sync-llamaindex
Open

docs(zh-CN): sync LlamaHub API example#708
ShawnSiao wants to merge 2 commits into
huggingface:mainfrom
ShawnSiao:docs/zh-sync-llamaindex

Conversation

@ShawnSiao

Copy link
Copy Markdown
Contributor

Summary

Sync the Chinese LlamaHub example with the current LlamaIndex integration setup.

Change rationale

English source commit eede97f adds the Hugging Face embedding package, reads HF_TOKEN from the environment, selects the provider automatically, and prints the completion response.

Changes

  • Updated units/zh-CN/unit2/llama-index/llama-hub.mdx.
  • Added installation of llama-index-embeddings-huggingface.
  • Replaced the hard-coded token placeholder with .env loading and HF_TOKEN lookup.
  • Added provider="auto" and explicit response printing.
  • Translated the two new reader-facing code comments.

Verification

  • Ran git diff --check.
  • Confirmed MDX code-fence and image counts are unchanged.
  • Parsed the embedded Python example successfully with ast.parse.
  • Confirmed no open overlapping PR for this page before submission.

Related to #152.

@ShawnSiao
ShawnSiao marked this pull request as ready for review July 20, 2026 14:08
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.

1 participant