-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added ollama and openai Fastapi api services #482
Conversation
Thanks for your contribution! But there are some linting errors. Please make sure to run pre-commit run --all-files before submitting to ensure all linting checks pass. |
Hi there. Thanks alot for answering me. Best regards |
By the way, why don't you put this directly as a github action to automatically apply linting to the project? |
Thank you again for your incredible contribution! It seems that automation can't fix all the linting errors, so some manual adjustments are still needed. |
You are welcome. For now there is ollama and openai, But I'll add more services for other backends. Thanks for accepting my contribution. |
Add FastAPI Services for LightRAG Integration
Overview
Added two FastAPI services that provide REST API endpoints for utilizing LightRAG in distributed applications:
These services enable easy integration of LightRAG capabilities into existing applications through HTTP endpoints.
Key Features
Common Features
Ollama Service Specific
OpenAI Service Specific
Configuration Options
Ollama Service
OpenAI Service
API Endpoints
Both services provide:
/query
: Document querying/query/stream
: Streaming responses/documents/text
: Text insertion/documents/file
: File upload/documents/batch
: Batch file processing/documents/scan
: Directory scanning/health
: System statusUsage Examples
Query Example
Document Upload
Testing
Documentation
Future Improvements
Dependencies
This PR significantly enhances LightRAG's usability in distributed environments and makes it easier to integrate with existing applications.