Commit graph

43 commits

Author SHA1 Message Date
Raphaël MANSUY
4b18e6b3e4 cherry-pick 1ad0bf82 2025-12-04 19:19:22 +08:00
Raphaël MANSUY
3a4b81ba46 cherry-pick 746c069a 2025-12-04 19:19:03 +08:00
Raphaël MANSUY
d2b9a36d92 cherry-pick 69a0b74c 2025-12-04 19:19:03 +08:00
Raphaël MANSUY
b2c2eb267d cherry-pick 4b31942e 2025-12-04 19:19:03 +08:00
Raphaël MANSUY
86df9402c7 cherry-pick c61b7bd4 2025-12-04 19:18:35 +08:00
Raphaël MANSUY
4d0654b2bc cherry-pick 433ec813 2025-12-04 19:18:35 +08:00
Raphaël MANSUY
aff704e58a cherry-pick c434879c 2025-12-04 19:15:03 +08:00
Raphaël MANSUY
fce5dc6be6 cherry-pick c46c1b26 2025-12-04 19:15:03 +08:00
Raphaël MANSUY
b108045767 cherry-pick 1e477e95 2025-12-04 19:14:31 +08:00
Raphaël MANSUY
a4b3da862b cherry-pick 02fdceb9 2025-12-04 19:14:31 +08:00
Raphaël MANSUY
3aa214b005 cherry-pick 3d9de5ed 2025-12-04 19:14:30 +08:00
Raphaël MANSUY
88c78625f8 cherry-pick 74694214 2025-12-04 19:14:29 +08:00
Raphaël MANSUY
af3b2cf118 cherry-pick 0b3d3150 2025-12-04 19:14:29 +08:00
yangdx
a32d201f17 Refactor dependencies and add test extra in pyproject.toml
• Pin httpx version in api extra
• Extract test dependencies to new extra
• Move httpx pin from evaluation to api
• Add api dependency to evaluation extra
• Separate test from evaluation concerns

(cherry picked from commit 268e4ff6f1)
2025-12-04 19:11:14 +08:00
yangdx
97a2c8e8b9 Add ruff as dependency to pytest and evaluation extras
(cherry picked from commit 5f91063c7a)
2025-12-04 19:11:13 +08:00
yangdx
9cf1629117 Add pre-commit to pytest dependencies and format test code
• Add pre-commit to pytest extra deps
• Update lock file dependencies

(cherry picked from commit 5da82bb096)
2025-12-04 19:11:12 +08:00
yangdx
a6fc87d50e Replace pytest group reference with explicit dependencies in evaluation
• Remove pytest group dependency
• Add explicit pytest>=8.4.2
• Add pytest-asyncio>=1.2.0
• Add pre-commit directly
• Fix potential circular dependency

(cherry picked from commit 472b498ade)
2025-12-04 19:11:12 +08:00
yangdx
a5b3be1f5a Refactor pytest dependencies into separate optional group
- Extract pytest deps to own group
- Reference pytest group in evaluation
- Add pytest config to pyproject.toml
- Update uv.lock with new structure

(cherry picked from commit b7b8d15632)
2025-12-04 19:11:11 +08:00
yangdx
95d47566c1 Improve docling integration with macOS compatibility and CLI flag
- Add --docling CLI flag for easier setup
- Add numpy version constraints
- Exclude docling on macOS (fork-safety)

(cherry picked from commit a24d8181c2)
2025-12-04 19:11:10 +08:00
anouarbm
a934becfcc feat: add optional Langfuse observability integration
This contribution adds optional Langfuse support for LLM observability and tracing.
Langfuse provides a drop-in replacement for the OpenAI client that automatically
tracks all LLM interactions without requiring code changes.

Features:
- Optional Langfuse integration with graceful fallback
- Automatic LLM request/response tracing
- Token usage tracking
- Latency metrics
- Error tracking
- Zero code changes required for existing functionality

Implementation:
- Modified lightrag/llm/openai.py to conditionally use Langfuse's AsyncOpenAI
- Falls back to standard OpenAI client if Langfuse is not installed
- Logs observability status on import

Configuration:
To enable Langfuse tracing, install the observability extras and set environment variables:

```bash
pip install lightrag-hku[observability]

export LANGFUSE_PUBLIC_KEY="your_public_key"
export LANGFUSE_SECRET_KEY="your_secret_key"
export LANGFUSE_HOST="https://cloud.langfuse.com"  # or your self-hosted instance
```

If Langfuse is not installed or environment variables are not set, LightRAG
will use the standard OpenAI client without any functionality changes.

Changes:
- Modified lightrag/llm/openai.py (added optional Langfuse import)
- Updated pyproject.toml with optional 'observability' dependencies

Dependencies (optional):
- langfuse>=3.8.1

(cherry picked from commit 626b42bc40)
2025-12-04 19:11:08 +08:00
yangdx
8bb23b9bfa Update qdrant-client minimum version from 1.7.0 to 1.11.0
• Bump qdrant-client to >=1.11.0
• Update pyproject.toml dependency
• Update requirements files
• Sync uv.lock with new version
• Maintain <2.0.0 upper bound

(cherry picked from commit e8f5f57ec7)
2025-12-04 19:09:08 +08:00
yangdx
7525c7836c Update pymilvus to >=2.6.2 and add protobuf compatibility constraint
(cherry picked from commit 49197fbfc0)
2025-12-04 19:09:07 +08:00
yangdx
cd0cd99062 Include static files in package distribution
- Add static dir to MANIFEST.in
- Update package data config
- Ensure static assets are bundled
- Fix missing static file issue

(cherry picked from commit 16d3d82a0e)
2025-12-04 19:09:02 +08:00
Won-Kyu Park
f4d6fcbe91 remove deprecated dotenv package.
(cherry picked from commit 532400412e)
2025-12-04 19:09:00 +08:00
yangdx
c80a9d6ef0 Remove docling dependency and related packages from project
* Remove docling from pyproject.toml
* Update requirements files
* Clean up uv.lock dependencies
* Reduce offline docker image size

(cherry picked from commit f2b6a068e3)
2025-12-04 19:09:00 +08:00
yangdx
69f38041cc Remove explicit protobuf dependency from offline storage requirements
(cherry picked from commit bc1a70bad0)
2025-12-04 19:08:58 +08:00
yangdx
6bd5b2d95b Add offline deployment support with cache management and layered deps
• Add tiktoken cache downloader CLI
• Add layered offline dependencies
• Add offline requirements files
• Add offline deployment guide

(cherry picked from commit a5c05f1b92)
2025-12-04 19:08:58 +08:00
yangdx
fe05563ecb Remove future dependency and replace passlib with direct bcrypt
(cherry picked from commit fc44f11368)
2025-12-04 19:08:56 +08:00
Won-Kyu Park
dd5b220e58 remove deprecated dotenv package.
(cherry picked from commit 532400412e)
2025-12-04 19:08:40 +08:00
yangdx
f142a8c375 Remove docling dependency and related packages from project
* Remove docling from pyproject.toml
* Update requirements files
* Clean up uv.lock dependencies
* Reduce offline docker image size

(cherry picked from commit f2b6a068e3)
2025-12-04 19:08:28 +08:00
yangdx
077a2fdbb7 Remove explicit protobuf dependency from offline storage requirements
(cherry picked from commit bc1a70bad0)
2025-12-04 19:07:22 +08:00
yangdx
b0bdbb5839 Add offline deployment support with cache management and layered deps
• Add tiktoken cache downloader CLI
• Add layered offline dependencies
• Add offline requirements files
• Add offline deployment guide

(cherry picked from commit a5c05f1b92)
2025-12-04 19:07:09 +08:00
yangdx
5c8f3f9418 Remove future dependency and replace passlib with direct bcrypt
(cherry picked from commit fc44f11368)
2025-12-04 19:05:02 +08:00
yangdx
194f46f239 Add json_repair dependency to project requirements 2025-08-27 11:14:09 +08:00
yangdx
b5682b15cb Remove json-repair from core deps, add missing api deps 2025-08-25 07:23:41 +08:00
yangdx
14e083a1a6 fix: replace pyuca with pypinyin for Chinese pinyin sorting and add file_path sort 2025-08-17 15:21:24 +08:00
yangdx
d98fe6f340 Move json-repair to main dependencies 2025-08-01 19:59:39 +08:00
yangdx
32af45ff46 refactor: improve JSON parsing reliability with json-repair library
Replace regex-based JSON extraction with json-repair for better handling of malformed LLM responses. Remove deprecated JSON parsing utilities and clean up keyword_extraction parameter across LLM providers.

- Remove locate_json_string_body_from_string() and convert_response_to_json()
- Use json-repair.loads() in extract_keywords_only() for robust parsing
- Clean up LLM interfaces and remove unused parameters
- Add json-repair dependency
2025-08-01 19:36:20 +08:00
yangdx
790abf148b Add psutil to API dependencies 2025-08-01 10:55:43 +08:00
yangdx
44b7ce222e feat: add default storage dependencies and optimize imports
- Add nano-vectordb and networkx to pyproject.toml dependencies
- Replace dynamic imports with direct imports for 4 default storage implementations
- Improve startup performance while maintaining backward compatibility
2025-07-24 16:14:26 +08:00
Marvin Schmidt
42a1da0041 fix(build): pyproject.toml setup 2025-07-11 12:01:34 +02:00
yangdx
bd50827ffc Update pyproject.toml to specify Python 3.10 as the minimum required version. 2025-07-05 23:00:22 +08:00
yangdx
2e2b9f3b48 Refactor setup.py to utilize pyproject.toml for project installation. 2025-07-05 11:19:00 +08:00