mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add input variables to begin component (#3498)
### What problem does this PR solve? #3355 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -98,7 +98,8 @@ def message_fit_in(msg, max_length=4000):
|
||||
return c, msg
|
||||
|
||||
msg_ = [m for m in msg[:-1] if m["role"] == "system"]
|
||||
msg_.append(msg[-1])
|
||||
if len(msg) > 1:
|
||||
msg_.append(msg[-1])
|
||||
msg = msg_
|
||||
c = count()
|
||||
if c < max_length:
|
||||
|
||||
Reference in New Issue
Block a user