fix(main.py): copy messages - prevent modifying user input
Fixes https://github.com/BerriAI/litellm/discussions/4489
This commit is contained in:
parent
c31156e5e6
commit
be3c98bc16
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user