2552 Commits

Author SHA1 Message Date
zrguo
96b9bd8cc5 fix lint 2025-06-19 14:16:24 +08:00
zrguo
523550d9ba
Merge pull request #1643 from eddiemaru-101/fix/ollama-timeout-handling
Fix: Increase Ollama timeout values to prevent ReadTimeout errors
2025-06-19 14:15:05 +08:00
zrguo
c8b56620c1 Merge branch 'main' into delete_doc 2025-06-19 14:12:17 +08:00
zrguo
03dd99912d RAG-Anything Integration 2025-06-17 01:16:02 +08:00
zrguo
3abdc42549 Merge branch 'main' into delete_doc 2025-06-16 17:02:21 +08:00
Ken Chen
cf441aa84c Add missing methods for MongoGraphStorage 2025-06-15 21:22:32 +08:00
yangdx
1389265695 Bump api version to 1.3.9 2025-06-11 17:03:27 +08:00
yangdx
62621979f0 Bump api version to 0173 2025-06-11 16:37:52 +08:00
yangdx
888be97b06 Fix linting 2025-06-11 16:36:05 +08:00
yangdx
ba5e95ea9e Merge branch 'main' into litellm-problem 2025-06-11 16:27:32 +08:00
yangdx
c3f5c413fa feat(api): add /ps endpoint to list running models for Ollama API 2025-06-11 16:23:02 +08:00
yangdx
9351b09cc7 Enhance Ollama interface compatibility 2025-06-11 15:16:32 +08:00
yangdx
7b07d4c917 feat: 支持 LiteLLM 客户端的 application/octet-stream 请求
修改 Ollama API 路由处理程序,使 /chat 和 /generate 端点能够接受 Content-Type 为 application/octet-stream 的请求。通过绕过 FastAPI 的自动请求验证机制,手动解析请求体,解决了 LiteLLM 客户端连接时出现的 422 错误。此更改保持了对现有 application/json 请求的向后兼容性。
2025-06-11 13:42:30 +08:00
yangdx
ad81e59d9a Fix logger problem 2025-06-11 13:30:45 +08:00
kwilt
09cbcc4572 fix typo: "extrat" -> extract 2025-06-09 08:28:14 -05:00
zrguo
3a9494ab60 Update operate.py 2025-06-09 19:47:29 +08:00
zrguo
9a71a10bc0 Update operate.py 2025-06-09 19:40:29 +08:00
zrguo
ead82a8dbd update delete_by_doc_id 2025-06-09 18:52:34 +08:00
pablo-statsig
4a8202138c
Remove graspologic pip installation that no longer seems to be used
As far as I can tell this is no longer actually used and its usage was removed in this commit:
83353ab9a6 (diff-a346bcfb05aab0cc0c0baa6018976f4efab339e8cade9f6f8fb658fcbd54ae2e)

Our systems are flagging this package as having a dependency on a package with a less permissive license so I would appreciate if it can be removed if its no longer needed.  Let me know if that is not the case.
2025-06-05 18:01:00 -07:00
zrguo
cc9040d70c fix lint 2025-06-05 17:37:11 +08:00
zrguo
8a726f6e08 MinerU integration 2025-06-05 17:02:48 +08:00
Alexander Bruhn
5e3970e18b
Resolve confusion between azure embedding and completion environment variables 2025-06-04 14:45:11 +02:00
yangdx
1575c7a5f4 Update webui assets 2025-06-02 18:11:04 +08:00
yangdx
ca3ae05356 Update webui assets 2025-06-02 17:46:22 +08:00
yangdx
66e4109cff Bump api version to 0172 2025-06-02 17:44:44 +08:00
eddiemaru-101
77399e051f Fix: Increase Ollama timeout values to prevent ReadTimeout errors 2025-05-30 22:43:52 +09:00
yangdx
36a736db0b Fix node merge error 2025-05-30 12:30:24 +08:00
zrguo
40b10e8fcf Update insert_custom_kg 2025-05-27 16:07:04 +08:00
omri.alon
efccdf0838 Adding citation support in custom graph creation 2025-05-26 20:30:59 +03:00
yangdx
070a5db801 Update README 2025-05-23 12:50:48 +08:00
yangdx
ada2443653 Optimize default setting of PostgreSQL 2025-05-22 17:09:26 +08:00
yangdx
2ee809cf58 Increase PG connection pool to 20 2025-05-22 16:37:18 +08:00
yangdx
c300f2fc91 Merge branch 'jidodata-ykim/main' 2025-05-22 10:48:24 +08:00
yangdx
3b9c28fae9 Fix linting 2025-05-22 10:46:03 +08:00
yangdx
e14c69ce4a Merge branch 'belabon25/main' 2025-05-22 10:06:52 +08:00
yangdx
a6046bf827 Fix linting 2025-05-22 10:06:09 +08:00
yangdx
bb27bb4309 Fix linting 2025-05-22 09:59:53 +08:00
Benjamin L
1b6ddcaf5b change validator method names 2025-05-21 16:06:35 +02:00
Benjamin L
62b536ea6f Adding file_source.s as optional attribute to text.s requests 2025-05-21 15:10:27 +02:00
yumpyy
4d806a1263
feat(api): update endpoint to support new parameter
Update the API server to support the new parameter from the core library (PR #1032).
2025-05-21 15:50:05 +05:30
yangdx
702e87492c Bump api version to 0171 2025-05-21 16:52:33 +08:00
yangdx
85bed30764 Fix linting 2025-05-21 16:46:36 +08:00
yangdx
45cebc71c5 Refactor: Optimize static file caching for WebUI
- Renamed `NoCacheStaticFiles` to `SmartStaticFiles`.
- Implemented long-term caching (1 year, immutable) for versioned assets in `/webui/assets/`.
- Ensured `index.html` remains un-cached.
- Set correct `Content-Type` for JS and CSS files.
2025-05-21 16:46:18 +08:00
yangdx
0961a21722 Set correct Content-Type header for JavaScript files
• Fix missing Content-Type header for .js files
• Ensure proper MIME type handling
• Improve browser compatibility
2025-05-21 16:17:42 +08:00
Martin Perez-Guevara
3d418d95c5 feat: Integrate Opik for Enhanced Observability in LlamaIndex LLM Interactions
This pull request demonstrates how to create a new Opik project when using LiteLLM for LlamaIndex-based LLM calls. The primary goal is to enable detailed tracing, monitoring, and logging of LLM interactions in a new Opik project_name, particularly when using LiteLLM as an API proxy. This enhancement allows for better debugging, performance analysis, observability when using LightRAG with LiteLLM and Opik.

**Motivation:**

As our application's reliance on Large Language Models (LLMs) grows, robust observability becomes crucial for maintaining system health, optimizing performance, and understanding usage patterns. Integrating Opik provides the following key benefits:

1.  **Improved Debugging:** Enables end-to-end tracing of requests through the LlamaIndex and LiteLLM layers, making it easier to identify and resolve issues or performance bottlenecks.
2.  **Comprehensive Performance Monitoring:** Allows for the collection of vital metrics such as LLM call latency, token usage, and error rates. This data can be filtered and analyzed within Opik using project names and tags.
3.  **Effective Cost Management:** Facilitates tracking of token consumption associated with specific requests or projects, leading to better cost control and optimization.
4.  **Deeper Usage Insights:** Provides a clearer understanding of how different components of the application or various projects are utilizing LLM capabilities.

These changes empower developers to seamlessly add observability to their LlamaIndex-based LLM workflows, especially when leveraging LiteLLM, by passing necessary Opik metadata.

**Changes Made:**

1.  **`lightrag/llm/llama_index_impl.py`:**
    *   Modified the `llama_index_complete_if_cache` function:
        *   The `**kwargs` parameter, which previously handled additional arguments, has been refined. A dedicated `chat_kwargs={}` parameter is now used to pass keyword arguments directly to the `model.achat()` method. This change ensures that vendor-specific parameters, such as LiteLLM's `litellm_params` for Opik metadata, are correctly propagated.
        *   The logic for retrieving `llm_instance` from `kwargs` was removed as `model` is now a direct parameter, simplifying the function.
    *   Updated the `llama_index_complete` function:
        *   Ensured that `**kwargs` (which may include `chat_kwargs` or other parameters intended for `llama_index_complete_if_cache`) are correctly passed down.

2.  **`examples/unofficial-sample/lightrag_llamaindex_litellm_demo.py`:**
    *   This existing demo file was updated to align with the changes in `llama_index_impl.py`.
    *   The `llm_model_func` now passes an empty `chat_kwargs={}` by default to `llama_index_complete_if_cache` if no specific chat arguments are needed, maintaining compatibility with the updated function signature. This file serves as a baseline example without Opik integration.

3.  **`examples/unofficial-sample/lightrag_llamaindex_litellm_opik_demo.py` (New File):**
    *   A new example script has been added to specifically demonstrate the integration of LightRAG with LlamaIndex, LiteLLM, and Opik for observability.
    *   The `llm_model_func` in this demo showcases how to construct the `chat_kwargs` dictionary.
    *   It includes `litellm_params` with a `metadata` field for Opik, containing `project_name` and `tags`. This provides a clear example of how to send observability data to Opik.
    *   The call to `llama_index_complete_if_cache` within `llm_model_func` passes these `chat_kwargs`, ensuring Opik metadata is included in the LiteLLM request.

These modifications provide a more robust and extensible way to pass parameters to the underlying LLM calls, specifically enabling the integration of observability tools like Opik.

Co-authored-by: Martin Perez-Guevara <8766915+MartinPerez@users.noreply.github.com>
Co-authored-by: Young Jin Kim <157011356+jidodata-ykim@users.noreply.github.com>
2025-05-20 17:47:05 +02:00
yangdx
b4615247c9 Bump core version to 1.3.8 2025-05-18 07:20:00 +08:00
yangdx
38b862e993 Remove unsed functions 2025-05-18 07:16:52 +08:00
sa9arr
36b606d0db Fix: Correct GraphML to JSON mapping in xml_to_json function 2025-05-17 19:32:25 +05:45
yangdx
c41f8d9ed3 Update README 2025-05-16 09:05:50 +08:00
yangdx
e5b0807298 Update README 2025-05-15 17:36:45 +08:00