mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: Set default rerank_model to empty string in Chat class (#8130)
### What problem does this PR solve? Previously when LLM.rerank_model was not configured: - SDK would pass None as the value - Database field with null=False constraint would reject it - Caused storage failures for unset rerank_model cases Now: - SDK checks for None value before database operations - Provides empty string as default when rerank_model is unset ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -46,7 +46,7 @@ class Chat(Base):
|
||||
self.top_n = 8
|
||||
self.top_k = 1024
|
||||
self.variables = [{"key": "knowledge", "optional": True}]
|
||||
self.rerank_model = None
|
||||
self.rerank_model = ""
|
||||
self.empty_response = None
|
||||
self.opener = "Hi! I'm your assistant, what can I do for you?"
|
||||
self.show_quote = True
|
||||
|
||||
Reference in New Issue
Block a user