Commit Graph

2258 Commits

Author SHA1 Message Date
3ced290eb5 Feat: Add support for document meta fields update through api (#5120)
### What problem does this PR solve?

add support for update document meta data through  api
### 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-02-19 13:39:31 +08:00
fab0f07379 fix: Ensure that the commands are executed in the correct directory s… (#5089)
…o that all services (including the es and infinity containers) can be
started correctly, and resolve the Failed to resolve 'es01' #4875

### What problem does this PR solve?

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

### Type of change

- [x] Documentation Update
2025-02-19 13:19:36 +08:00
8525f55ad0 Fix: Option ineffective in Chat API (#5118)
### What problem does this PR solve?

API options like `stream` was ignored when no session_id was provided.

This PR fixes the issue.

Test command and expected result:
```
curl  --request POST \
     --url http://:9222/api/v1/chats/2f2e1d30ee6111efafe211749b004925/completions \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer ragflow-xxx' \
     --data '{
   "question":"Who are you",
   "stream":false
}'
{"code":0,"data":"data:{\"code\": 0, \"message\": \"\", \"data\": {\"answer\": \"Hi! I'm your assistant, what can I do for you?\", \"reference\": {}, \"audio_binary\": null, \"id\": null, \"session_id\": \"82ceb0fcee7111efafe211749b004925\"}}\n\n"}

```



### Type of change

- [*] Bug Fix (non-breaking change which fixes an issue)
2025-02-19 13:18:51 +08:00
e6c024f8bf Fix too many clause while searching. (#5119)
### What problem does this PR solve?

#5100

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-19 13:18:39 +08:00
c28bc41a96 Fix docx table issue. (#5117)
### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-19 12:40:06 +08:00
29a59ed7e2 Fix: Use self.dataStore.indexExist in all_tags method of Dealer (#5108)
### What problem does this PR solve?

This PR fixes an AttributeError in the all_tags method of the Dealer
class. Previously, the method incorrectly called
self.docStoreConn.indexExist instead of self.dataStore.indexExist. Since
self.docStoreConn was never set (and self.dataStore is already
initialized in init), this resulted in an error when attempting to check
if the index exists. This change ensures that the proper connector is
used for the index existence check, thereby resolving the issue._

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-19 11:50:57 +08:00
f8b80f3f93 Feat: Write the thinking style in the MarkdownContent layer #4930 (#5091)
### What problem does this PR solve?

Feat: Write the thinking style in the MarkdownContent layer #4930

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-18 19:34:54 +08:00
189007e44d Fix: PUT method does not work as expected with Invoke component (#5081)
### What problem does this PR solve?
Invoke component can be used to call third party services.
Tried GET/POST/PUT from web UI, and found PUT request failed like this:
(test api: api/v1/chats/<assistant_id>)
 ```
{"code":100,"data":null,"message":"AttributeError("'NoneType' object has
no attribute 'get'")"}
```

Root cause: Invoke PUT with a 'data=args' parameter, which is a form-encoded data, however the default content type setting of request header is application/json. The test api could not deal with such case.

Fix: use the 'json' parameter of reqeusts.put(), same as Invoke POST. Do not use the 'data' parameter.
Another way is to use 'data=json.dumps(args)'.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-18 19:34:22 +08:00
3cffadc7a2 Added an FAQ (#5092)
### What problem does this PR solve?


### Type of change


- [x] Documentation Update
2025-02-18 19:29:40 +08:00
18e43831bc Feat: Add ChunkedResultPanel #3221 (#5085)
### What problem does this PR solve?

Feat: Add ChunkedResultPanel #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-18 17:53:51 +08:00
3356de55ed Fix: Chunk problem tag content cannot be displayed completely. #5076 (#5077)
### What problem does this PR solve?

Fix: Chunk problem tag content cannot be displayed completely. #5076

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-18 15:26:24 +08:00
375e727f9a Feat: Extract the common parts of groupImage2TextOptions and groupOptionsByModelType #5063 (#5074)
### What problem does this PR solve?

Feat: Extract the common parts of groupImage2TextOptions and
groupOptionsByModelType #5063

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-18 15:13:55 +08:00
a2b8ba472f Feat: Add LanguageAbbreviation to simplify language resource files. #5065 (#5072)
### What problem does this PR solve?

Feat: Add LanguageAbbreviation to simplify language resource files.
#5065

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-02-18 15:06:53 +08:00
00c7ddbc9b Fix: The max tokens defined by the tenant are not used (#4297) (#2817) (#5066)
### What problem does this PR solve?

Fix: The max tokens defined by the tenant are not used (#4297) (#2817)


### Type of change

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

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-02-18 13:42:22 +08:00
3e0bc9e36b Added a graphrag guide (#4978)
### What problem does this PR solve?



### Type of change


- [x] Documentation Update
2025-02-18 13:42:06 +08:00
d6ba4bd255 add option Embed into webpage (#5065)
add option Embed into webpage

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-02-18 13:41:19 +08:00
84b4b38cbb Remove <think> for exeSql component. (#5069)
### What problem does this PR solve?

#5061
#5067

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-18 13:39:37 +08:00
4694604836 Specify img2text model by tag (#5063)
### What problem does this PR solve?

The current design is not well-suited for multimodal models, as each
model can only be configured for a single purpose—either chat or
Img2txt. To work around this limitation, we use model aliases such as
gpt-4o-mini and gpt-4o-mini-2024-07-18.

To fix this, this PR allows specifying the Img2txt model by tag instead
of model_type.

### Type of change
- [x] Refactoring
2025-02-18 11:14:48 +08:00
224c5472c8 update locale vi (#5035)
update locale vi
2025-02-18 10:16:03 +08:00
409310aae9 Update agent session API, to support uploading files while create a new session (#5039)
### What problem does this PR solve?
Update the agent session API "POST /api/v1/agents/{agent_id}/sessions",
to support uploading files while create a new session:
- currently, the API only supports requesting with a json body. If user
wants to upload a doc or image when create session, like what is already
supported on the web client, we need to update the API.
- if upload an image, ragflow will call image2text, and a user_id is
needed for the image2text model. So we need to send user_id in the API
request. As form-data is needed to upload files, not json body, seems we
need to put the user_id in the url as an optional parameter (currently
user_id is an optional in json body).


### Type of change

- [x] Documentation Update
- [x] Other (please describe):
2025-02-18 09:45:40 +08:00
9ff825f39d Ignore exceptions when no index ahead. (#5047)
### What problem does this PR solve?

### Type of change

- [x] Refactoring
2025-02-18 09:09:22 +08:00
7b5d831296 Fix: Starting the source code on Windows, the 'HTTP API' returns 404 (#5042)
Fix: When starting the backend service from source code on Windows, the
"HTTP API" no longer returns 404.
2025-02-17 19:33:49 +08:00
42ee209084 Feat: Replace next-login-bg.svg #3221 (#5046)
### What problem does this PR solve?

Feat: Replace next-login-bg.svg #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-17 19:33:34 +08:00
e4096fbc33 Add another decrypt function. (#5043)
### What problem does this PR solve?



### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-02-17 18:09:11 +08:00
3aa5c2a699 Ignore exception of empty index. (#5030)
### What problem does this PR solve?

### Type of change


- [x] Refactoring
2025-02-17 15:59:55 +08:00
2ddf278e2d Fix: Cannot distinguish between export and import icons #5025 (#5031)
### What problem does this PR solve?

Fix: Cannot distinguish between export and import icons #5025

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 15:25:34 +08:00
f46448d04c Remove <think> for KG extraction. (#5027)
### What problem does this PR solve?

#4946

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 14:06:06 +08:00
ab17606e79 Rewrite Support specified language or language according to initial question (#4990)
Support specified language or language according to initial question

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-02-17 13:33:43 +08:00
7c90b87715 Fix window size of ES issue. (#5026)
### What problem does this PR solve?

#5015

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 12:48:56 +08:00
d2929e432e Feat: add LLM provider PPIO (#5013)
### What problem does this PR solve?

Add a LLM provider: PPIO

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Documentation Update
2025-02-17 12:03:26 +08:00
88daa349f9 Optimize conversation when uploading attachments (#4964)
### What problem does this PR solve?

#4929

### Type of change

- [x] Performance Improvement
2025-02-17 12:03:04 +08:00
f29da49893 Fix keyerror issue while rebuilding graph. (#5022)
### What problem does this PR solve?

#4995

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 12:02:44 +08:00
194e8ea696 Fix knowledge graph node not found (#4968) (#4970)
### What problem does this PR solve?

Fix knowledge graph node not found (#4968)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 11:49:27 +08:00
810f997276 Fix <think> in keywords or question auto-generations. (#5021)
### What problem does this PR solve?

**#4983**

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-17 11:20:57 +08:00
6daae7f226 Added PEP 723 metadata to download_deps.py (#4988)
### What problem does this PR solve?

Added PEP 723 metadata to download_deps.py

### Type of change

- [x] Refactoring
2025-02-15 14:54:21 +08:00
f9fe6ac642 Feat: Add background color to GraphRag configuration #4980 (#4981)
### What problem does this PR solve?

Feat: Add background color to GraphRag configuration #4980

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-14 18:57:09 +08:00
b4ad565df6 Feat: Add ParsedPageCard component #3221 (#4976)
### What problem does this PR solve?

Feat: Add ParsedPageCard component #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-14 18:12:39 +08:00
754d5ea364 add gemini-2.0-flash-thinking-exp-01-21 (#4957)
add gemini-2.0-flash-thinking-exp-01-21
2025-02-14 13:31:07 +08:00
26add87c3d Feat: Jump from the chunk page to the dataset page #3221 (#4961)
### What problem does this PR solve?
Feat: Jump from the chunk page to the dataset page #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-14 13:30:55 +08:00
986062a604 format number float (#4954)
format number float
2025-02-14 12:00:34 +08:00
29ceeba95f Fix hit cache error while raptoring. (#4955)
### What problem does this PR solve?

#4126

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-14 12:00:19 +08:00
849d9eb463 Ignore tenant not found error while increasing token usage. (#4950)
### What problem does this PR solve?

#4940

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-14 11:10:49 +08:00
dce7053c24 Feat: Add an id to the dataset testing route #3221 (#4951)
### What problem does this PR solve?

Feat: Add an id to the dataset testing route #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-14 10:43:59 +08:00
042f4c90c6 Fixes KeyError: 'content' when using stream=False (#4944)
### 🛠 Fixes `KeyError: 'content'` when using `stream=False`

#### 🔍 Problem  
When calling the chat API with `stream=False`, the code attempts to
access `msg[-1]["content"]` without verifying if the key exists. This
causes a `KeyError` when the message structure does not contain
`"content"`.

This issue was discussed in
[#4885](https://github.com/infiniflow/ragflow/issues/4885), where we
analyzed the root cause. The error does not occur with `stream=True`, as
the response is processed differently.

####  Solution  
- **Logging Fix:**  
  - Before accessing `msg[-1]["content"]`, we check if the key exists.  
- If it does not exist, a default value (`"[content not available]"`) is
used to prevent errors.

- **Structural Fix in `msg` Construction:**  
- Ensured that every message in `msg` contains the `"content"` key, even
if empty.
- This fixes the issue at its root and ensures consistent behavior
between `stream=True` and `stream=False`.

#### 🔄 Impact  
- Prevents the `KeyError` without affecting normal application flow.  
- Ensures the integrity of the `msg` structure, avoiding future
failures.



### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-14 10:27:01 +08:00
c1583a3e1d Feat: Bind data to datasets page #3221 (#4938)
### What problem does this PR solve?

Feat: Bind data to datasets page #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-14 09:38:48 +08:00
17fa2e9e8e Added a guide on setting metadata (#4935)
### What problem does this PR solve?


### Type of change


- [x] Documentation Update
2025-02-13 18:16:45 +08:00
ff237f2dbc Feat: Display Think for Deepseek R1 model #4903 (#4930)
### What problem does this PR solve?

Feat: Display Think for Deepseek R1 model #4903

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-02-13 15:59:42 +08:00
50c99599f2 Fix DB assistant template error. (#4925)
### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-13 11:33:25 +08:00
891ee85fa6 Feat: Add ChatInput component #3221 (#4915)
### What problem does this PR solve?

Feat: Add ChatInput component #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-02-12 19:32:49 +08:00
a03f5dd9f6 Add a list of large language models of deepseek and image2text models… (#4914)
### What problem does this PR solve?

#4870 
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-02-12 17:52:29 +08:00