mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 04:50:39 +00:00
removed some filler comments
This commit is contained in:
parent
17ef47e909
commit
9ba1000cf4
1 changed files with 0 additions and 3 deletions
|
@ -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]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue