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

API Installation Options and Documentation Improvements #507

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ParisNeo
Copy link
Contributor

Changes

This PR introduces several improvements to the installation process and documentation:

  1. Added API support as an optional installation feature:

    • Added extras_require for API dependencies
    • Separated core and API requirements
    • Made API installation optional using pip install "lightrag-hku[api]"
  2. Reorganized API implementation:

    • Created proper entry points for all servers
    • Added consistent command-line interface
    • Improved server configuration options
  3. Unified documentation in README.md:

    • Combined all API documentation
    • Added clear installation instructions
    • Included comprehensive configuration options
    • Added detailed usage examples
    • Documented automatic vectorization features

Benefits

  • Cleaner installation process
  • Reduced dependencies for users who don't need API
  • Better organized codebase
  • Improved documentation and examples
  • Clearer API usage instructions

Testing

  • Tested installation with and without API support
  • Verified all entry points work correctly
  • Confirmed documentation accuracy
  • Tested automatic vectorization features

Notes

This PR improves the overall user experience by making the API optional and providing clearer documentation while maintaining all existing functionality.

@LarFii
Copy link
Collaborator

LarFii commented Dec 24, 2024

Thank you for your contribution! However, after merging the previous PR, there are now some conflicting files. I've tried to resolve the conflicts, but I wasn't able to succeed. Could you please assist me in resolving them?

@ParisNeo
Copy link
Contributor Author

Let me recover the latest version and try to fix the merge errors

@ParisNeo
Copy link
Contributor Author

oh I see the problem :)
Someone else did add an api but only for azure openai and it doesn't install as mine (the user still needs to do many things manually).
My apis are callable once installed with pip install -e . [api] or if you build a pipy module they'll be able to easily install it with pip directly.

the user will be able after installing to do:
ollama-lightrag-server --model mistral-nemo:latest --embedding-model bge-m3 --embedding-dim 1024

from anywhere in the system.

I respect the work of the other dude so I'll just merge the two and provide both options.
If he acceptsd I can harmonize our api endpoints. I wasd planning on adding litellm, openwebui and others.

@ParisNeo
Copy link
Contributor Author

OK, merged correctly.
You can accept if you want.

@ParisNeo
Copy link
Contributor Author

As of the harmonization of the endpoints it looks like he just copied my endpoints so they are exactly the same.
:)
He also copied my documentation.

I have no problem with that. He added a new functionality so that's fine.

If you please I can just remove the readme he added and put everything with my documentation in the main README and add change his code to be also directly callable from anywhere.

Let's start by accepting this pull request then I'll do that next :)

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.

2 participants