mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue