### What problem does this PR solve?
before refactor
1. create file record
2. Add to blob
if have some execption at 2 the system db will have a file record but
not have related blob, which will introduce some bug.
after refactor
1. add to blob
2. create file record.
if 1 success but 2 failed just have a dirty blob in blob system, user
will not feel that
### Type of change
- [x] Refactoring
Feat: Delete the agent and tool nodes downstream of the agent node #3221 (#8450)
### What problem does this PR solve?
Feat: Delete the agent and tool nodes downstream of the agent node #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
fix a bug when using huggingface embedding api (#8432)
### What problem does this PR solve?
image_version: v0.19.1
This PR fixes a bug in the HuggingFaceEmBedding API method that was
causing AssertionError: assert len(vects) == len(docs) during the
document embedding process.
#### Problem
The HuggingFaceEmbed.encode() method had an early return statement
inside the for loop, causing it to return after processing only the
first text input instead of processing all texts in the input list.
**Error Messenge**
```python
AssertionError: assert len(vects) == len(docs) # input chunks != embedded vectors from embedding api
File "/ragflow/rag/svr/task_executor.py", line 442, in embedding
```
**Buggy code(/ragflow/rag/llm/embedding_model.py)**
```python
class HuggingFaceEmbed(Base):
def __init__(self, key, model_name, base_url=None):
if not model_name:
raise ValueError("Model name cannot be None")
self.key = key
self.model_name = model_name.split("___")[0]
self.base_url = base_url or "http://127.0.0.1:8080"
def encode(self, texts: list):
embeddings = []
for text in texts:
response = requests.post(...)
if response.status_code == 200:
try:
embedding = response.json()
embeddings.append(embedding[0])
# ❌ Early return
return np.array(embeddings), sum([num_tokens_from_string(text) for text in texts])
except Exception as _e:
log_exception(_e, response)
else:
raise Exception(...)
```
**Fixed Code(I just Rollback this function to the v0.19.0 version)**
```python
Class HuggingFaceEmbed(Base):
def __init__(self, key, model_name, base_url=None):
if not model_name:
raise ValueError("Model name cannot be None")
self.key = key
self.model_name = model_name.split("___")[0]
self.base_url = base_url or "http://127.0.0.1:8080"
def encode(self, texts: list):
embeddings = []
for text in texts:
response = requests.post(...)
if response.status_code == 200:
embedding = response.json()
embeddings.append(embedding[0]) # ✅ Only append, no return
else:
raise Exception(...)
return np.array(embeddings), sum([num_tokens_from_string(text) for text in texts]) # ✅ Return after processing all
```
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Feat: Use the message_id returned by the interface as the id of the reply message #3221 (#8434)
### What problem does this PR solve?
Feat: Use the message_id returned by the interface as the id of the
reply message #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve?
This is a cherry-pick from #7781 as requested.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
Update .env ,Defaults to the v0.19.1-slim edition (#8412)
### What problem does this PR solve?
Update .env ,Defaults to the v0.19.1-slim edition
### Type of change
- [x] Other (please describe): Update .env ,Defaults to the
v0.19.1-slim edition
### What problem does this PR solve?
- Simplify AzureChat constructor by passing base_url directly
- Clean up spacing and formatting in chat_model.py
- Remove redundant parentheses and improve code consistency
- #8423
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Feat: Add HTTPS setup instructions and configuration for Nginx (#8401)
### What problem does this PR solve?
_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._
### Type of change: Documentation Update/Refactoring
#### Summary
Adds HTTPS/SSL configuration guide/example to enable secure RAGFlow
deployments with proper certificate management.
#### Changes
- New HTTPS Setup Section: Step-by-step guide for SSL certificate
configuration
- Let's Encrypt Integration: Complete Certbot setup instructions
- Docker Configuration: Volume mapping examples for certificates
#### Key Features
- Prerequisites checklist
- Docker Compose configuration examples
- Support for both Let's Encrypt and existing certificates
#### Files Modified
- `README.md`
- `ragflow.https.conf` (new file)
Feat: The delete button is displayed only when the cursor is hovered over the connection line #3221 (#8422)
### What problem does this PR solve?
Feat: The delete button is displayed only when the cursor is hovered
over the connection line #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Fix: Database Query Vulnerable to Injection Attacks in rag/utils/opendal_conn.py (#8408)
**Context and Purpose:**
This PR automatically remediates a security vulnerability:
- **Description:** Detected possible formatted SQL query. Use
parameterized queries instead.
- **Rule ID:**
python.lang.security.audit.formatted-sql-query.formatted-sql-query
- **Severity:** HIGH
- **File:** rag/utils/opendal_conn.py
- **Lines Affected:** 98 - 98
This change is necessary to protect the application from potential
security risks associated with this vulnerability.
**Solution Implemented:**
The automated remediation process has applied the necessary changes to
the affected code in `rag/utils/opendal_conn.py` to resolve the
identified issue.
Please review the changes to ensure they are correct and integrate as
expected.
Feat: Solved the conflict between the Handle click and drag events of the canvas node #3221 (#8413)
### What problem does this PR solve?
Feat: Solved the conflict between the Handle click and drag events of
the canvas node #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Fix: Document parse via API will alot problen (#8407)
### What problem does this PR solve?
#8391#8404
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
---------
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
### What problem does this PR solve?
Feat: Add Tavily operator #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Fix: Fixed the issue where tag content would overflow the container #8392 (#8393)
### What problem does this PR solve?
Fix: Fixed the issue where tag content would overflow the container
#8392
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve?
Feat: Improve the tavily form #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Fix: code debug may corrupt by history answer (#8385)
### What problem does this PR solve?
Fix code debug may corrupt by history answer.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Docs: add curl example for interacting with the RAGFlow MCP server (#8372)
### What problem does this PR solve?
Add curl example for interacting with the RAGFlow MCP server. Special
thanks to @writinwaters for his expert refinement.
### Type of change
- [x] Documentation Update
---------
Co-authored-by: writinwaters <cai.keith@gmail.com>
Feat: Synchronize the data of the tavily form to the canvas node #3221 (#8377)
### What problem does this PR solve?
Feat: Synchronize the data of the tavily form to the canvas node #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Feat: Deleting the last tool of the agent will delete the tool node #3221 (#8376)
### What problem does this PR solve?
Feat: Deleting the last tool of the agent will delete the tool node
#3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Feat: Save the agent tool data to the node #3221 (#8364)
### What problem does this PR solve?
Feat: Save the agent tool data to the node #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Docs: Update version references to v0.19.1 in READMEs and docs (#8366)
### What problem does this PR solve?
- Update Docker image version badges and references from v0.19.0 to
v0.19.1
- Modify version mentions in all localized README files (id, ja, ko,
pt_br, tzh, zh)
- Update version in docker/README.md and related documentation files
- Includes updates to Helm values and Python SDK dependencies
### Type of change
- [x] Documentation Update
### What problem does this PR solve?
- Correct boolean parsing for 'desc' parameter in document_app.py to
properly handle string values
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Fix typo in dataset name length error message (#8351)
### What problem does this PR solve?
Fixes a minor grammar issue in a user-facing error message. The original
message said "large than" instead of the correct comparative form
"larger than". Just a quick fix I noticed while reading the code.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Fix: Fixed the issue where the initial value of the slice method was not displayed in the dialog box #3221 (#8354)
### What problem does this PR solve?
Fix: Fixed the issue where the initial value of the slice method was not
displayed in the dialog box #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve?
1. rename var
2. update if statement
### Type of change
- [x] Refactoring
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
Feat: Add a tool operator node from the agent form #3221 (#8344)
### What problem does this PR solve?
Feat: Add a tool operator node from the agent form #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve?
Fix illegal variable name in Jinja2. #8316.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve?
Fix sandbox sandalone context error. #8307.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Feat: Add tool nodes and tool drop-down menu #3221 (#8335)
### What problem does this PR solve?
Feat: Add tool nodes and tool drop-down menu #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Feat: Add child nodes and their connecting lines by clicking #3221 (#8314)
### What problem does this PR solve?
Feat: Add child nodes and their connecting lines by clicking #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve?
- Highlight current language in README badges by changing color for
Traditional and Simplified Chinese
### Type of change
- [x] Documentation Update
Refa: Implement centralized file name length limit using FILE_NAME_LEN_LIMIT constant (#8318)
### What problem does this PR solve?
- Replace hardcoded 255-byte file name length checks with
FILE_NAME_LEN_LIMIT constant
- Update error messages to show the actual limit value
- #8290
### Type of change
- [x] Refactoring
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
Fix: Add validation for empty filenames in document_app.py (#8321)
### What problem does this PR solve?
- Add validation for empty filenames in document_app.py and trim
whitespace
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Feat: Add a child operator node by clicking the operator node anchor point #3221 (#8309)
### What problem does this PR solve?
Feat: Add a child operator node by clicking the operator node anchor
point #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Feat: Modify the anchor point positioning of the classification operator node #3221 (#8299)
### What problem does this PR solve?
Feat: Modify the anchor point positioning of the classification operator
node #3221
### Type of change
- [x] New Feature (non-breaking change which adds functionality)