488 Commits

Author SHA1 Message Date
liwenju0
efdfb39a33
Feat: Add Duplicate ID Check and Update Deletion Logic (#6376)
- Introduce the `check_duplicate_ids` function in `dataset.py` and
`doc.py` to check for and handle duplicate IDs.
- Update the deletion operation to ensure that when deleting datasets
and documents, error messages regarding duplicate IDs can be returned.
- Implement the `check_duplicate_ids` function in `api_utils.py` to
return unique IDs and error messages for duplicate IDs.


### What problem does this PR solve?

Close https://github.com/infiniflow/ragflow/issues/6234

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: wenju.li <wenju.li@deepctr.cn>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-21 14:05:17 +08:00
liwenju0
1bb990719e
Feat: Add user registration toggle feature (#6327)
### What problem does this PR solve?

Feat: Add user registration toggle feature. Added a user registration
toggle REGISTER_ENABLED in the settings and .env config file. The user
creation interface now checks the state of this toggle to control the
enabling and disabling of the user registration feature.

the front-end implementation is done, the registration button does not
appear if registration is not allowed. I did the actual tests on my
local server and it worked smoothly.
### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: wenju.li <wenju.li@deepctr.cn>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-21 09:38:15 +08:00
hy89
1d9ca172e3
Fix(api): correct document parsing progress check logic (#6318)
- Fix incorrect progress check condition that prevented re-parsing of
completed documents
- Allow parsing for documents with progress 0.0 (not started) or 1.0
(completed)
- Only block parsing for documents currently in progress (0.0 < progress
< 1.0)

Close #6312

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-20 16:00:17 +08:00
so95
344727f9ba
Feat: add agent share team viewer (#6222)
### What problem does this PR solve?
Allow member view agent  
#  Canvas editor

![image](https://github.com/user-attachments/assets/042af36d-5fd1-43e2-acf7-05869220a1c1)
# List agent

![image](https://github.com/user-attachments/assets/8b9c7376-780b-47ff-8f5c-6c0e7358158d)
# Setting 

![image](https://github.com/user-attachments/assets/6cb7d12a-7a66-4dd7-9acc-5b53ff79a10a)
 
_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

### 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: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-19 19:04:13 +08:00
so95
53ac27c3ff
Feat: support agent version history. (#6130)
### What problem does this PR solve?
Add history version save
- Allows users to view and download agent files by version revision
history

![image](https://github.com/user-attachments/assets/c300375d-8b97-4230-9fc4-83d148137132)

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

### 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: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-19 15:22:53 +08:00
Kevin Hu
c2302abaf1
Fix: remove dup ids for APIs. (#6263)
### What problem does this PR solve?

#6234

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-19 13:10:59 +08:00
Kevin Hu
41e112294b
Fix: let parsing continue. (#6259)
### What problem does this PR solve?

#6229

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-19 12:18:19 +08:00
Kevin Hu
09291db805
Fix: miss url path. (#6211)
### What problem does this PR solve?

#6210

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-18 14:02:57 +08:00
Kevin Hu
e9a6675c40
Fix: enable ollama api-key. (#6205)
### What problem does this PR solve?

#6189

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-18 13:37:34 +08:00
Kevin Hu
1b9f63f799
Fix: doc deletion failure with invalid docid. (#6194)
### What problem does this PR solve?

#6174

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-18 10:44:50 +08:00
kuro5989
2c3c4274be
Fix: Correct parameter retrieval in thumbup api (#6114)
### What problem does this PR solve?

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

up_down was using req.get("set") to retrieve the parameter, but
according to the frontend code, it should be req.get("thumbup").



![image](https://github.com/user-attachments/assets/7189c982-f80e-48c9-a0a3-40f8a5d9e47b)



1842ca0334/web/src/interfaces/request/chat.ts (L3)


1842ca0334/api/apps/conversation_app.py (L327)

### Type of change

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

Co-authored-by: zhaozhicheng <zhicheng.zhao@fastonetech.com>
2025-03-17 16:02:53 +08:00
Kevin Hu
5748d58c74
Refa: refine the error message. (#6151)
### What problem does this PR solve?

#6138

### Type of change

- [x] Refactoring
2025-03-17 13:07:22 +08:00
Kevin Hu
37f3486483
Fix: validation of readonly fields. (#6144)
### What problem does this PR solve?

#6104

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-17 12:22:49 +08:00
Zhichang Yu
89a69eed72
Introduced task priority (#6118)
### What problem does this PR solve?

Introduced task priority

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-03-14 23:43:46 +08:00
Kevin Hu
a6ab2c71c3
Refa: enlarge default max request body size. (#6088)
### What problem does this PR solve?


### Type of change


- [x] Refactoring
2025-03-14 15:21:08 +08:00
Kevin Hu
5c8ad6702a
Fix: check the file name length. (#6083)
### What problem does this PR solve?

#6060

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-14 15:01:37 +08:00
Kevin Hu
7463241896
Fix: empty doc id validation. (#6064)
### What problem does this PR solve?

#6031

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-14 11:45:44 +08:00
任奇
940072592f
Fix: chat_completion answer data incorrect (#6041)
### What problem does this PR solve?

fix chat_completion answer data incorrect

### Type of change

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

Co-authored-by: renqi <renqi08266@fxomail.com>
2025-03-13 18:59:59 +08:00
Kevin Hu
471bd92b4c
Fix: empty api-key causes problems. (#6022)
### What problem does this PR solve?
#5926

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-13 14:57:47 +08:00
liwenju0
e3ea4b7ec2
Fix: Add Knowledge Base Document Parsing Status Check (#5966)
When creating and updating chats, add a check for the parsing status of
knowledge base documents. Ensure that all documents have been parsed
before allowing chat creation to improve user experience and system
stability.

**Main Changes:**

- Add document parsing status check logic in `chat.py`.
- Implement the `is_parsed_done` method in `knowledgebase_service.py`.
- Prevent chat creation when documents are being parsed or parsing has
failed.

### What problem does this PR solve?

fix this bug:https://github.com/infiniflow/ragflow/issues/5960

### Type of change

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

Co-authored-by: wenju.li <wenju.li@deepctr.cn>
2025-03-12 16:07:45 +08:00
Kevin Hu
80f87913bb
Fix: empty value updating. (#5949)
### What problem does this PR solve?

#5920

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-12 11:25:17 +08:00
Kevin Hu
45123dcc0a
Fix: ollama model add error. (#5947)
### What problem does this PR solve?

#5944

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-12 10:56:05 +08:00
Raghav Patidar
49d560583f
Fix: HTTP API Updates Read-Only Dataset Fields During Modification #5923 (#5937)
### What problem does this PR solve?

Fixes #5923 

Fixes the readonly variables from payload at
 /datasets/<dataset_id> 

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

Now if user tries to modify readonly values then it will show " The
input parameters are invalid. "

invalid_keys = {"id", "embd_id", "chunk_num", "doc_num", "parser_id",
"create_date", "create_time", "created_by",
"status","token_num","update_date","update_time"}
    if any(key in req for key in invalid_keys):
return get_error_data_result(message="The input parameters are
invalid.")
i have include those readonly keys in invalid_keys

### Type of change

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

---------

Co-authored-by: Raghav <2020csb1115@iitrpr.ac.in>
2025-03-12 10:27:02 +08:00
任奇
ed11be23bf
Fix: When calling the Create chat completion API, the response data… (#5928)
### What problem does this PR solve?


### Type of change

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

Co-authored-by: renqi <renqi08266@fxomail.com>
2025-03-11 19:56:07 +08:00
Kevin Hu
7b96146d3f
Fix: check desc parameter value. (#5884)
### What problem does this PR solve?

#5851

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-11 11:43:21 +08:00
Kevin Hu
780ee2b2be
Fix: empty dataset parser id. (#5878)
### What problem does this PR solve?

#5709

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-11 10:23:08 +08:00
Raghav Patidar
6f9cd96ec5
Fix: dataset_ids parameter (#5864)
### What problem does this PR solve?

Fixed  #5839
This PR fix  error code 102, stating dataset_ids is required.

curl --request POST \
     --url http://{address}/api/v1/chats \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --data '{
         "name": "test_chat"
     }'
     
     this is not getting datasetids , fix for it. 

file location : sdk\python\ragflow_sdk\ragflow.py

added : "dataset_ids": dataset_list if dataset_list else [],



### Type of change

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

Co-authored-by: Raghav <2020csb1115@iitrpr.ac.in>
2025-03-11 09:44:06 +08:00
hy89
8ba1e6c183
Feat: add sync_dsl parameter to support synchronizing modifications to existing sessions (#5843)
When accessing the /api/v1/agents/{agent_id}/completions API, sessions
created before agent modifications retain the old DSL data. To use the
latest agent configuration (like new prompts) in historical sessions, I
added the sync_dsl parameter. It defaults to False to maintain existing
behavior and only synchronizes when set to True. If needed, a manual
synchronization API can be created to trigger the sync explicitly.
2025-03-10 17:46:08 +08:00
Kevin Hu
82f5d901c8 Refa: add model. (#5820)
### What problem does this PR solve?

#5783

### Type of change

- [x] Refactoring
2025-03-10 11:22:06 +08:00
dek
dc4d4342cd Fix: broken /api/v1/chats endpoint (#5785)
### What problem does this PR solve?

The `/api/v1/chats` API endpoint was broken, any GET request got the
following response:
```
{"code":100,"data":null,"message":"TypeError(\"'int' object is not callable\")"}
```

With this log ragflow-server side:

```
2025-03-07 14:36:26,297 ERROR    20 'int' object is not callable
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/ragflow/api/utils/api_utils.py", line 303, in decorated_function
    return func(*args, **kwargs)
  File "/ragflow/api/apps/sdk/chat.py", line 323, in list_chat
    logging.WARN(f"Don't exist the kb {kb_id}")
TypeError: 'int' object is not callable
2025-03-07 14:36:26,298 INFO     20 172.18.0.6 - - [07/Mar/2025 14:36:26] "GET /api/v1/chats HTTP/1.1" 200 -
``` 
This was caused by the incorrect use of `logging.WARN` as a method (it's
a loglevel object), instead of the correct `logging.warning()` method.

This PR fixes that, and also rewrites the message to be grammaticaly
correct.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-10 11:22:06 +08:00
kaiyuan Zhang
50c510d16b Fix: bugs mentioned by#5760 (#5778)
### What problem does this PR solve?

Fixed the issue of "stop deleting when encountering invalid dataset ID"

#5760

### Type of change

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

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-10 11:22:06 +08:00
hy89
66938e0b68
Feat(api): Add dsl parameters to control whether dsl fields are included (#5769)
1. **Issue**: When calling `list_agent_session` via the HTTP API, users
may only need to display conversation messages, and do not want to see
the associated dsl, which can be very large. Therefore, consider adding
a control option to determine whether the DSL should be returned, with
the default being to return it.

2. **Documentation Discrepancy**: In the HTTP API documentation, under
"List agent sessions," the "Response" section states that the "data"
field is a dictionary when "success" is returned. However, the actual
returned data is a list. This discrepancy has been corrected.
2025-03-07 16:58:00 +08:00
Kevin Hu
3418984848
Fix: meta fields updata issue, (#5764)
### What problem does this PR solve?

#4789

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-07 16:21:27 +08:00
Kevin Hu
da3f279495
Fix: add the validation for parser_config. (#5755)
### What problem does this PR solve?

#5719

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-07 15:34:34 +08:00
Kevin Hu
c87b58511e
Fix: API empty field input. (#5748)
### What problem does this PR solve?

#5709

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-07 13:11:07 +08:00
Kevin Hu
ff35c140dc
Refa: remove dataset language and validate dataset name length. (#5707)
### What problem does this PR solve?

#5686
#5702

### Type of change

- [x] Refactoring
2025-03-06 17:08:28 +08:00
Omar Leonardo Sanchez Granados
11e3f5e8b2
Feat: Upload file UI/UX enhancements (#5359)
### What problem does this PR solve?

Modifies the UX for uploading process on the website.

- Adds option to parse on creation the files
- Adds progress bar to display progress of chunk
- Adds per file feedback on uploading operation

#### Screenshots:

- Show files uploading:

![image](https://github.com/user-attachments/assets/a5693f42-8232-4d5c-a240-20ed343634a5)

- Errors on specific files

![image](https://github.com/user-attachments/assets/986a7f54-ab32-4634-89ab-a098fe1954aa)


### Type of change

- [X] New Feature (non-breaking change which adds functionality)
2025-03-05 15:20:32 +08:00
kunyi-yang
555c70672e
Fix:Fix the bug of incorrectly gets the APIToken. (#5597)
### What problem does this PR solve?

Fix the issue where, when getting a user's APIToken, if the user is part
of another user's team, it incorrectly gets the Team owner's APIToken
instead.


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-04 19:35:42 +08:00
Kevin Hu
688cb8f19d
Fix: remove KB id restriction while creating chat. (#5588)
### What problem does this PR solve?

#5586

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-04 12:36:37 +08:00
Zhichang Yu
c813c1ff4c
Made task_executor async to speedup parsing (#5530)
### What problem does this PR solve?

Made task_executor async to speedup parsing

### Type of change

- [x] Performance Improvement
2025-03-03 18:59:49 +08:00
Debug Doctor
76cb4cd174
Feat: add 'delete' for agent's sessions api and unify apis of agent sdk (#5525)
### What problem does this PR solve?

Add sessions deletion support for agent in http and python api

### Type of change

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

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-03-03 17:15:16 +08:00
Felipe Hertzer
8b1a4365ed
Fix email validation regex (#5533)
### What problem does this PR solve?

This pull request aims to fix a bug that prevents certain email
addresses from signing up. The affected TLDs were returning 'invalid
email address' errors:

.museum
.software
.photography
.technology
.marketing
.education
.international
.community
.construction
.government
.consulting
....

### Type of change

- [X] Bug Fix (non-breaking change which fixes an issue)
2025-03-03 10:55:10 +08:00
Kevin Hu
4c9a3e918f
Fix: add image2text issue. (#5431)
### What problem does this PR solve?

#5356

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-27 14:06:49 +08:00
Kevin Hu
5beb022ee1
Fix: string format error. (#5422)
### What problem does this PR solve?

#5404

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-27 12:01:46 +08:00
Kevin Hu
afaa7144a5
Fix: issue of no id for /datasets/<dataset_id>/documents (#5420)
### What problem does this PR solve?

#5401

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-27 10:39:34 +08:00
so95
fefea3a2a5
Fixed OpenAI compatibility stream [DONE] (#5389)
Fixed OpenAI compatibility stream [DONE]



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

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-02-26 17:55:12 +08:00
Yongteng Lei
0e920a91dd
FIX: correct typo (#5387)
### What problem does this PR solve?

Correct typo in supported_models file

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-26 17:21:09 +08:00
Yongteng Lei
cdcaae17c6
Feat: add VLLM (#5380)
### What problem does this PR solve?

Read to add VLMM.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-02-26 16:04:53 +08:00
k
5cab6c4ccb
Fix:HTTP API -> Stop parsing documents(AttributeError: ‘list‘ object … (#5375)
…has no attribute ‘id‘)

### What problem does this PR solve?

No PR

![image](https://github.com/user-attachments/assets/988d31bc-6551-4bb8-846c-cbbc1883d804)


![image](https://github.com/user-attachments/assets/8b09681b-1239-4ed9-8bc3-11436c5e90bc)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
2025-02-26 15:57:50 +08:00
Yongteng Lei
b3b341173f
DOCS: add OpenAI-compatible http and python api reference (#5374)
### What problem does this PR solve?

Add OpenAI-compatible http and python api reference

### Type of change

- [x] Documentation Update

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
Co-authored-by: writinwaters <93570324+writinwaters@users.noreply.github.com>
2025-02-26 15:52:26 +08:00