Skip to content
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

Index API #953

Merged
merged 12 commits into from
Aug 20, 2024
Merged

Index API #953

merged 12 commits into from
Aug 20, 2024

Conversation

dworthen
Copy link
Contributor

Description

This PR pulls out the core library logic from the CLI layer into a dedicated API layer, useful for programmatic use cases. The CLI now calls out to the API layer.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • I have added appropriate unit tests (if applicable).

Additional Notes

[Add any additional notes or context that may be helpful for the reviewer(s).]

@dworthen dworthen requested review from a team as code owners August 16, 2024 16:31
- Implement main API entry point: build_index
- Rely on GraphRagConfig instead of PipelineConfig
    - This unifies the API signature with the
    promt_tune and query API entry points
- Derive cache settings, config, and resuming from
    the config and other arguments to
    simplify/reduce arguments to build_index
- Add preflight config file validations
- Add semver change
@gmile
Copy link

gmile commented Aug 19, 2024

Would it be possible to import API module into a custom python script to use it directly? If yes, could you please provide a simple example of how to do this?

(asking as barely a python expert, but interested in embedding graphrag as part of my custom python webserver)

AlonsoGuevara
AlonsoGuevara previously approved these changes Aug 20, 2024
graphrag/index/api.py Outdated Show resolved Hide resolved
graphrag/index/api.py Outdated Show resolved Hide resolved
graphrag/index/api.py Outdated Show resolved Hide resolved
graphrag/index/api.py Outdated Show resolved Hide resolved
@AlonsoGuevara AlonsoGuevara merged commit 6b4de3d into main Aug 20, 2024
15 checks passed
@AlonsoGuevara AlonsoGuevara deleted the indexing-api branch August 20, 2024 21:42
@caster-Q
Copy link

Is there a demo that can run this index API?

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.

5 participants