File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -916,13 +916,10 @@ async def proxy_request(request: Request):
916916 # History not enabled: start with empty
917917 chat_history = []
918918
919- # Merge incoming system/user messages into chat_history in original order
920- # (We generally skip adding "assistant" messages from the request side,
921- # because those come from the model, not from the user.)
919+ # Merge incoming messages into chat_history in original order
922920 new_messages = data .get ("messages" , [])
923921 for msg in new_messages :
924- if msg ["role" ] in ["system" , "user" ]:
925- chat_history .append (msg )
922+ chat_history .append (msg )
926923
927924 # Now data["messages"] should be the entire conversation the model sees
928925 data ["messages" ] = chat_history
You can’t perform that action at this time.
0 commit comments