950 Commits

Author SHA1 Message Date
Kevin Hu
9ca86d801e
Refa: add provider info while adding model. (#9273)
### What problem does this PR solve?
#9248

### Type of change

- [x] Refactoring
2025-08-07 09:40:42 +08:00
Stephen Hu
1409bb30df
Refactor:Improve the logic so that it does not decode base 64 for the test image each time (#9264)
### What problem does this PR solve?

Improve the logic so that it does not decode base 64 for the test image
each time

### Type of change

- [x] Refactoring
- [x] Performance Improvement

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-08-06 11:42:25 +08:00
Yongteng Lei
465f7e036a
Feat: advanced list dialogs (#9256)
### What problem does this PR solve?

Advanced list dialogs

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-08-06 10:33:52 +08:00
Yongteng Lei
e6bad45c6d
Fix: update broken agent OpenAI-Compatible completion due to v0.20.0 changes (#9241)
### What problem does this PR solve?

Update broken agent OpenAI-Compatible completion due to v0.20.0. #9199 

Usage example:

**Referring the input is important, otherwise, will result in empty
output.**

<img width="1273" height="711" alt="Image"
src="https://github.com/user-attachments/assets/30740be8-f4d6-400d-9fda-d2616f89063f"
/>

<img width="622" height="247" alt="Image"
src="https://github.com/user-attachments/assets/0a2ca57a-9600-4cec-9362-0cafd0ab3aee"
/>

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-05 17:47:25 +08:00
sinopec
98a83543e8
Fix: fix mismatch of assitant message and its reference (#9233)
### What problem does this PR solve?

#9232

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

1. When creating a new session, initialize an empty reference that
includes both the app api and sdk API.
2. Fix the logic when retrieving references for historical messages: the
number of dialogue messages and reference messages may differ, but it
should match the number of assistant messages.

Co-authored-by: Li Ye <liye@unittec.com>
2025-08-05 14:32:39 +08:00
Kevin Hu
6ec3f18e22
Fix: self-deployed LLM error, (#9217)
### What problem does this PR solve?

Close #9197
Close #9145

### Type of change

- [x] Refactoring
- [x] Bug fixing.
2025-08-05 09:49:47 +08:00
Yongteng Lei
60d652d2e1
Feat: list documents supports range filtering (#9214)
### What problem does this PR solve?

list_document supports range filtering.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-08-04 16:35:35 +08:00
Jay Xu
83aca2d07b
fix #8424 NPE in dify_retrieval.py, add log exception (#9212)
### What problem does this PR solve?

fix #8424 NPE in dify_retrieval.py, add log exception

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-04 15:36:31 +08:00
Yongteng Lei
52a349349d
Fix: migrate deprecated Langfuse API from v2 to v3 (#9204)
### What problem does this PR solve?

Fix:

```bash
'Langfuse' object has no attribute 'trace'
```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-04 14:45:43 +08:00
Stephen Hu
45bf294117
Refactor: support config strong test (#9198)
### What problem does this PR solve?


https://github.com/infiniflow/ragflow/issues/9189#issuecomment-3148920950

### Type of change
- [x] Refactoring

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-08-04 13:54:18 +08:00
Kevin Hu
30e9212db9
Fix: enlarge the timeout limits. (#9201)
### What problem does this PR solve?

#9189

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-04 13:34:34 +08:00
He Wang
d4b1d163dd
Fix: list tags api by using tenant id instead of user id (#9103)
### What problem does this PR solve?

The index name of the tag chunks is generated by the tenant id of the
knowledge base, so it should use the tenant id instead of the current
user id in the listing tags API.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-04 09:57:00 +08:00
Kevin Hu
a16cd4f110
Refa: add result to callback for agent tool use. (#9137)
### What problem does this PR solve?


### Type of change

- [x] Refactoring
2025-08-01 21:49:39 +08:00
天海蒼灆
6591031bad
Feat: Add industry-related search keyword generation function (#9156)
### What problem does this PR solve?
Add industry-related search keyword generation function
- When generating search keywords, support for specific industries has
been added
- If the "industry" parameter is provided, industry-specific
restrictions will be added to the prompt
- This change can help users generate more precise search keywords
within specific industries

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-08-01 15:50:46 +08:00
Yongteng Lei
cdac51f145
Fix: Redis stream lag can be nil (#9139)
### What problem does this PR solve?

```bash
Traceback (most recent call last):
  File "/home/infiniflow/workspace/ragflow/api/db/services/document_service.py", line 635, in update_progress
    info["progress_msg"] = "%d tasks are ahead in the queue..."%get_queue_length(priority)
  File "/home/infiniflow/workspace/ragflow/api/db/services/document_service.py", line 686, in get_queue_length
    return int(group_info.get("lag", 0))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
```
This issue can happen very rare. When a `stream` is first created, the
`lag` value may be nil, which can cause this issue. However, once any
message is synced, the `lag` will become `0` afterwards.

```bash
> XINFO GROUPS rag_flow_svr_queue
1)  1) "name"
    2) "rag_flow_svr_task_broker"
    3) "consumers"
    4) (integer) 0
    5) "pending"
    6) (integer) 0
    7) "last-delivered-id"
    8) "1753952489937-0"
    9) "entries-read"
   10) (nil)
   11) "lag"
   12) (nil)
```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-01 09:39:41 +08:00
Liu An
e9c5c7bc7c
Rafe: Update LLMService type hints (#9131)
### What problem does this PR solve?

- Add Generator return type annotation for tts method
- Import typing.Generator for type hints

### Type of change

- [x] Refactoring
2025-07-31 12:13:49 +08:00
Kevin Hu
d9fe279dde
Feat: Redesign and refactor agent module (#9113)
### What problem does this PR solve?

#9082 #6365

<u> **WARNING: it's not compatible with the older version of `Agent`
module, which means that `Agent` from older versions can not work
anymore.**</u>

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-30 19:41:09 +08:00
Liu An
ffff5c2e8c
Refa: Update base64 test image with new sample data (#9115)
### What problem does this PR solve?

Replace the placeholder test image in base64_image.py with a new sample
image data string.

### Type of change

- [x] Refactoring
2025-07-30 14:34:26 +08:00
kuschzzp
b638d3f773
Image validation of the image2text model without using local paths (#9052)
### What problem does this PR solve?

#9050

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-30 12:57:24 +08:00
wenxuan.zhang
30356b0b79
Fix : API /document/thumbnails using wrong method to get ''doc_ids' (#9097)
### What problem does this PR solve?

doc_ids is a list , should use request.args.getlist("doc_ids")

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-30 12:56:59 +08:00
Yongteng Lei
39ef2ffba9
Feat: parsing supports jsonl or ldjson format (#9087)
### What problem does this PR solve?

Supports jsonl or ldjson format. Feature request from
[discussion](https://github.com/orgs/infiniflow/discussions/8774).

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-30 09:48:20 +08:00
Zhichang Yu
342a04ec8a
Added infinity rank_feature support (#9044)
### What problem does this PR solve?

Added infinity rank_feature support

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-29 09:14:23 +08:00
Stephen Hu
5e7aaf2c41
Fix:When deleting a knowledge base that is currently performing a parsing task, the parsing queue will not be deleted! (#9018)
### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/8995

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-07-28 17:32:12 +08:00
Stephen Hu
0fccd1fef3
Fix:in the knowledge base operation file will result in an error (#8962)
### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/8941
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-25 19:26:31 +08:00
Yongteng Lei
5cc570f5e0
Refa: suppress DB migration error logs (#9043)
### What problem does this PR solve?

Suppress DB migration error logs.

### Type of change

- [x] Refactoring
2025-07-25 12:38:07 +08:00
Liu An
b5ffca332a
Refa: validation utils to use Pydantic v2 style models (#9037)
### What problem does this PR solve?

- Update BaseModel to use model_config instead of Config class
- Replace StrEnum with Literal types for method fields
- Convert Field declarations to Annotated style

### Type of change

- [x] Refactoring
2025-07-25 12:16:45 +08:00
Stephen Hu
bcaac061ac
Feature: Support set chats kbs to empty (#9038)
### What problem does this PR solve?
https://github.com/infiniflow/ragflow/issues/9034

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-25 10:06:33 +08:00
Gifford Nowland
34c35cf8ae
fix: obfuscate additional server secrets values (#9014)
### What problem does this PR solve?

Obfuscates additional secrets values on ragflow_server startup to
prevent leakage:
* `secret` (azure)
* `client_secret` (oauth)
* `http_secret_key` (authentication)
* `sas_token` (azure)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Gifford R Nowland <gifford.r.nowland@aero.org>
2025-07-24 10:16:23 +08:00
Yongteng Lei
8345e92671
Feat: OpenAI-compatible-API supports references (#8997)
### What problem does this PR solve?

OpenAI-compatible-API supports references.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-23 18:10:05 +08:00
Liu An
b4b6d296ea
Fix: Increase timeouts for document parsing and model checks (#8996)
### What problem does this PR solve?

- Extended embedding model timeout from 3 to 10 seconds in api_utils.py
- Added more time for large file batches and concurrent parsing
operations to prevent test flakiness
- Import from #8940
- https://github.com/infiniflow/ragflow/actions/runs/16422052652

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-23 15:08:36 +08:00
Liu An
0020c50000
Fix: Refactor parser config handling and add GraphRAG defaults (#8778)
### What problem does this PR solve?

- Update `get_parser_config` to merge provided configs with defaults
- Add GraphRAG configuration defaults for all chunk methods
- Make raptor and graphrag fields non-nullable in ParserConfig schema
- Update related test cases to reflect config changes
- Ensure backward compatibility while adding new GraphRAG support
- #8396

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-23 09:29:37 +08:00
Yongteng Lei
f63ad6b725
Fix: correct cancel logic error (#8973)
### What problem does this PR solve?

Correct cancel logic error

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Refactoring
2025-07-23 09:25:48 +08:00
Adrian Altermatt
6691532079
Feat: Add model editing functionality with improved UI labels (#8855)
### What problem does this PR solve?

Add edit button for local LLM models
<img width="1531" height="1428" alt="image"
src="https://github.com/user-attachments/assets/19d62255-59a6-4a7e-9772-8b8743101f78"
/>

<img width="1531" height="1428" alt="image"
src="https://github.com/user-attachments/assets/c3a0f77e-cc6b-4190-95a6-13835463428b"
/>



### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):

---------

Co-authored-by: Liu An <asiro@qq.com>
2025-07-21 19:16:53 +08:00
Kevin Hu
0b487dee43
Fix: support cross language for API. (#8946)
### What problem does this PR solve?

Close #8943

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-21 17:25:28 +08:00
Kevin Hu
c783d90ba3
Perf: set timeout for building chunks. (#8940)
### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
2025-07-21 15:56:45 +08:00
Kevin Hu
ab53a73768
Perf: limit embedding in KG. (#8917)
### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
2025-07-18 19:51:14 +08:00
天海蒼灆
412a088008
Feat: Add knowledge graph http api (#8896)
### What problem does this PR solve?

Add knowledge graph http api

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-17 19:20:48 +08:00
Kevin Hu
9767c26535
Fix: wrong parameters. (#8900)
### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-17 18:19:13 +08:00
Kevin Hu
ecdb1701df
Perf: test llm before RAPTOR. (#8897)
### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
2025-07-17 16:48:50 +08:00
湛露先生
fa1d6ed683
fix settings global docStoreConn for opensearch (#8885)
### What problem does this PR solve?
fix opensearch OSConnection init.
```
        docStoreConn = rag.utils.opensearch_conn.OSConnection()
```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2025-07-17 12:10:42 +08:00
Kevin Hu
fbd115773b
Perf: set timeout of some steps in KG. (#8873)
### What problem does this PR solve?

### Type of change


- [x] Performance Improvement
2025-07-16 18:06:03 +08:00
Kevin Hu
f2909ea0c4
Perf: retryable mysql connection. (#8858)
### What problem does this PR solve?

### Type of change

- [x] Performance Improvement
2025-07-15 19:05:48 +08:00
Kevin Hu
aa4a725529
Pref: use redis to check if canceled. (#8853)
### What problem does this PR solve?

### Type of change

- [x] Performance Improvement
2025-07-15 17:19:27 +08:00
Kevin Hu
24c41d2a61
Perf: make do_cancel quicker. (#8846)
### What problem does this PR solve?

### Type of change

- [x] Performance Improvement
2025-07-15 14:35:00 +08:00
Kevin Hu
c642dbefca
Perf: Enhance timeout handling. (#8826)
### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
2025-07-15 09:36:45 +08:00
Yongteng Lei
237e59532b
Feat: refine create and list operations for MCP dashboard (#8823)
### What problem does this PR solve?

Refine MCP dashboard create and list operations.

### Type of change

- [x] Refactoring
2025-07-14 14:36:56 +08:00
Yongteng Lei
72c19b44c3
Refa: better MIME content type (#8801)
### What problem does this PR solve?

Better uniform MIME content type.

### Type of change

- [x] Refactoring
2025-07-11 18:47:19 +08:00
Yongteng Lei
e8aee8d720
Feat: change document status in bulk (#8777)
### What problem does this PR solve?
 
Change document status in bulk.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-07-11 10:38:59 +08:00
haol
512772c45a
Fix: Resolve typo in /list route function (#8769)
### What problem does this PR solve?

Fixes a function name typo for the `/list` route in
`api/apps/conversation_app.py`.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-10 14:32:28 +08:00
He Wang
cedcd13204
fix: use tenant_id of kb to get index name in rm chunk func (#8760)
### What problem does this PR solve?

The rm function in chunk_app.py now takes the index name differently
than other functions, so there will be situations where users can create
and update a chunk but not delete it.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-10 10:30:56 +08:00