mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 18:23:28 +00:00
fix(main.py): copy messages - prevent modifying user input
Fixes https://github.com/BerriAI/litellm/discussions/4489
This commit is contained in:
@@ -676,6 +676,8 @@ def completion(
|
||||
client = kwargs.get("client", None)
|
||||
### Admin Controls ###
|
||||
no_log = kwargs.get("no-log", False)
|
||||
### COPY MESSAGES ### - related issue https://github.com/BerriAI/litellm/discussions/4489
|
||||
messages = deepcopy(messages)
|
||||
######## end of unpacking kwargs ###########
|
||||
openai_params = [
|
||||
"functions",
|
||||
|
||||
Reference in New Issue
Block a user