Skip to content

Commit 72374ef

Browse files
markurtzDaltheCowdependabot[bot]sjmonsonCopilot
authored
Fix preserved state across OpenAI requests when backend_body / backend_params are used (#236)
Signed-off-by: Mark Kurtz <mark.j.kurtz@gmail.com> Signed-off-by: dalthecow <dalcowboiz@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Benjamin Blue <dalcowboiz@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Samuel Monson <smonson@redhat.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 14ba613 commit 72374ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/guidellm/backend/openai.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import base64
2+
import copy
23
import json
34
import time
45
from collections.abc import AsyncGenerator
@@ -428,9 +429,9 @@ def _extra_body(self, endpoint_type: EndpointType) -> dict[str, Any]:
428429
or MODELS in self.extra_body
429430
or TEXT_COMPLETIONS in self.extra_body
430431
):
431-
return self.extra_body.get(endpoint_type, {})
432+
return copy.deepcopy(self.extra_body.get(endpoint_type, {}))
432433

433-
return self.extra_body
434+
return copy.deepcopy(self.extra_body)
434435

435436
def _completions_payload(
436437
self,

0 commit comments

Comments
 (0)