MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / add_component

Method add_component

examples/server/server.py:571–579  ·  view source on GitHub ↗
(component_schema: Dict[str, Any], is_required: bool)

Source from the content-addressed store, hash-verified

569 allof_property_items: List[Tuple[str, Any]] = []
570
571 def add_component(component_schema: Dict[str, Any], is_required: bool) -> None:
572 component_ref = component_schema.get("$ref")
573 if component_ref is not None:
574 component_schema = cast(Dict[str, Any], self._refs[component_ref])
575 if "properties" in component_schema:
576 for prop_name, prop_schema in cast(Dict[str, Any], component_schema["properties"]).items():
577 allof_property_items.append((prop_name, prop_schema))
578 if is_required:
579 allof_required_props.add(prop_name)
580
581 for entry in cast(List[Dict[str, Any]], schema["allOf"]):
582 if "anyOf" in entry:

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected