Repository navigation
docs(ag-ui): fix the router import path and install extra in the README - #23746
Open
ninglinLiu wants to merge 1 commit into
Open
ninglinLiu wants to merge 1 commit into
ninglinLiu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The AG-UI integration README's server example does not run as written:
get_ag_ui_workflow_routerfromllama_index.protocols.ag_ui.server, but the package has noservermodule, so the example fails withModuleNotFoundError: No module named 'llama_index.protocols.ag_ui.server'. The factory lives inllama_index.protocols.ag_ui.router(which is also what the package tests import).router.pyimportsfastapiat module level, but FastAPI is only installed through the package'sfastapiextra ([project.optional-dependencies]). With the README'spip install llama-index-protocols-ag-ui, importing the router fails withNo module named 'fastapi'.Changes (README only):
llama_index.protocols.ag_ui.router.pip install "llama-index-protocols-ag-ui[fastapi]"and note that the example also needsuvicorn.timeout,workflow_factory), matchingget_ag_ui_workflow_router's signature.Checked in a clean venv with
llama-index-protocols-ag-ui==0.6.0: the.serverimport raisesModuleNotFoundError, the router import fails without FastAPI, andfrom llama_index.protocols.ag_ui.router import get_ag_ui_workflow_routerworks once thefastapiextra is installed.AI disclosure: I used an AI assistant to help find this and draft the change. I reviewed the diff and verified the imports locally.
New Package?
Version Bump?
Type of Change
How Has This Been Tested?