removed some filler comments

This commit is contained in:
Ashwin Bharambe 2025-02-27 17:31:04 -08:00 committed by GitHub
parent 17ef47e909
commit 9ba1000cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,7 +131,6 @@ class LiteLLMOpenAIMixin(
Recursively add additionalProperties: False to all object schemas Recursively add additionalProperties: False to all object schemas
""" """
if isinstance(schema, dict): if isinstance(schema, dict):
# If this is an object schema
if schema.get("type") == "object": if schema.get("type") == "object":
schema["additionalProperties"] = False schema["additionalProperties"] = False
@ -139,12 +138,10 @@ class LiteLLMOpenAIMixin(
if "properties" in schema and schema["properties"]: if "properties" in schema and schema["properties"]:
schema["required"] = list(schema["properties"].keys()) schema["required"] = list(schema["properties"].keys())
# Handle properties within objects
if "properties" in schema: if "properties" in schema:
for prop_schema in schema["properties"].values(): for prop_schema in schema["properties"].values():
self._add_additional_properties_recursive(prop_schema) self._add_additional_properties_recursive(prop_schema)
# Handle anyOf/allOf/oneOf/not
for key in ["anyOf", "allOf", "oneOf"]: for key in ["anyOf", "allOf", "oneOf"]:
if key in schema: if key in schema:
for sub_schema in schema[key]: for sub_schema in schema[key]: