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

Method add_component

llama_cpp/llama_grammar.py:747–755  ·  view source on GitHub ↗
(comp_schema, is_required)

Source from the content-addressed store, hash-verified

745 hybrid_name = name
746
747 def add_component(comp_schema, is_required):
748 if (ref := comp_schema.get("$ref")) is not None:
749 comp_schema = self._refs[ref]
750
751 if "properties" in comp_schema:
752 for prop_name, prop_schema in comp_schema["properties"].items():
753 properties.append((prop_name, prop_schema))
754 if is_required:
755 required.add(prop_name)
756
757 for t in schema["allOf"]:
758 if "anyOf" in t:

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected