The top_k parameter already has a default value set in the QueryParam class (base.py), making these checks unnecessary. This change simplifies the code while maintaining the same functionality.
Changes:
Remove top_k check in query_text function
Remove top_k check in query_text_stream function
- Fix PostgreSQL encoding error by properly handling null bytes (0x00) in text processing.
- The clean_text function now removes null bytes from all input text during the indexing phase.
- Simplified LlamaIndex documentation in README
- Removed wrapper directory references
- Updated example code to reflect new directory structure
- Cleaned up custom knowledge graph example
- Adjusted file paths and import statements
https://github.com/HKUDS/LightRAG/pull/864#issuecomment-2669705946
- Created two new example scripts demonstrating LightRAG integration with LlamaIndex:
- `lightrag_llamaindex_direct_demo.py`: Direct OpenAI integration
- `lightrag_llamaindex_litellm_demo.py`: LiteLLM proxy integration
- Both examples showcase different search modes (naive, local, global, hybrid)
- Includes configuration for working directory, models, and API settings
- Demonstrates text insertion and querying using LightRAG with LlamaIndex
- removed wrapper directory and references to it
- Updated README.md with new Wrappers section detailing LlamaIndex integration
- Added LlamaIndex wrapper implementation in `lightrag/wrapper/llama_index_impl.py`
- Created two example scripts demonstrating LlamaIndex usage:
- Direct OpenAI integration
- LiteLLM proxy integration
- Added wrapper documentation in `lightrag/wrapper/Readme.md`
- Included comprehensive usage examples and configuration details
- Implemented LlamaIndex interface for language model interactions
- Added async chat completion support
- Included embedding generation functionality
- Implemented retry mechanisms for API calls
- Added configuration and message formatting utilities
- Supports OpenAI-style message handling and external settings