feat(llm): expand graph extraction service APIs - #72
Open
LRriver wants to merge 33 commits into
Open
Conversation
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.
Summary
content_type/contentsupport for raw text and pre-split chunks, request-bounded chunk parallelism, metadata, and structured error responses.Relation to apache#351
This builds on the initial synchronous
POST /graph/extractendpoint from apache#351. The deprecatedtextsalias remains accepted: a string maps tocontent_type=text, and a list maps to pre-split chunks. Multi-document extraction remains caller-managed through multiple API requests instead of hidden batch semantics in the synchronous endpoint.Write API Safety
/graph/importand/graph/extract-and-importrequirewrite_to_graph=true.client_config.graphso the target graph is explicit in the request and response metadata.Job Endpoint Notes
/graph/extract/jobsuses an in-memory, process-local job store.Tests
uv run ruff format --check .uv run ruff check .uv run pytest hugegraph-llm/src/tests/api/test_graph_extract_api.py hugegraph-llm/src/tests/api/test_graph_import_api.py hugegraph-llm/src/tests/api/test_graph_extract_jobs.py -qSKIP_EXTERNAL_SERVICES=true uv run pytest hugegraph-llm/src/tests/api -v --tb=shortSKIP_EXTERNAL_SERVICES=true uv run pytest hugegraph-llm/src/tests/config/ hugegraph-llm/src/tests/document/ hugegraph-llm/src/tests/operators/ hugegraph-llm/src/tests/models/ hugegraph-llm/src/tests/indices/ hugegraph-llm/src/tests/test_utils.py -v --tb=shortReview
Summary by CodeRabbit
发布说明
新功能
/graph/import和组合提取-导入端点/graph/extract-and-import改进