mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
refactor(responses): rename write-back helper out of the method's name
The recursion detector in code-quality reads the staticmethod _written_back_request_fields calling the module-level function of the same name as a recursive call. Renaming the module-level helper to _patch_or_convert_request_fields removes the shadowing and describes what it does: patch changed rows in place, else fall back to full conversion.
This commit is contained in:
parent
4261198b2f
commit
58c5223ab4
1 changed files with 2 additions and 2 deletions
|
|
@ -264,7 +264,7 @@ def _patched_request_fields(
|
|||
)
|
||||
|
||||
|
||||
def _written_back_request_fields(
|
||||
def _patch_or_convert_request_fields(
|
||||
raw_input: object,
|
||||
instructions: object,
|
||||
original_messages: Sequence[object],
|
||||
|
|
@ -408,7 +408,7 @@ class OpenAIResponsesHandler(BaseTranslation):
|
|||
guardrailed: Final = guardrailed_inputs.get("structured_messages")
|
||||
if guardrailed is None or guardrailed is structured_messages:
|
||||
return None
|
||||
return _written_back_request_fields(
|
||||
return _patch_or_convert_request_fields(
|
||||
data.get("input"),
|
||||
data.get("instructions"),
|
||||
structured_messages or (),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue