@@ -88,8 +88,8 @@ def __call__(
8888_COCOINDEX_ATTR_PREFIX = "cocoindex.io/"
8989
9090
91- class RelatedFieldAttribute (Enum ):
92- """The attribute of a field that is related to the op ."""
91+ class ArgRelationship (Enum ):
92+ """Specifies the relationship between an input argument and the output ."""
9393
9494 VECTOR_ORIGIN_TEXT = _COCOINDEX_ATTR_PREFIX + "vector_origin_text"
9595 CHUNKS_BASE_TEXT = _COCOINDEX_ATTR_PREFIX + "chunk_base_text"
@@ -103,15 +103,15 @@ class OpArgs:
103103 - cache: Whether the executor will be cached.
104104 - behavior_version: The behavior version of the executor. Cache will be invalidated if it
105105 changes. Must be provided if `cache` is True.
106- - related_arg_attr : It specifies the relationship between an input argument and the output,
107- e.g. `(RelatedFieldAttribute .CHUNKS_BASE_TEXT, "content")` means the output is chunks for the
106+ - arg_relationship : It specifies the relationship between an input argument and the output,
107+ e.g. `(ArgRelationship .CHUNKS_BASE_TEXT, "content")` means the output is chunks for the
108108 input argument with name `content`.
109109 """
110110
111111 gpu : bool = False
112112 cache : bool = False
113113 behavior_version : int | None = None
114- related_arg_attr : tuple [RelatedFieldAttribute , str ] | None = None
114+ arg_relationship : tuple [ArgRelationship , str ] | None = None
115115
116116
117117def _to_async_call (call : Callable [..., Any ]) -> Callable [..., Awaitable [Any ]]:
@@ -161,8 +161,8 @@ def analyze(
161161 attributes = []
162162
163163 def process_attribute (arg_name : str , arg : _engine .OpArgSchema ) -> None :
164- if op_args .related_arg_attr is not None :
165- related_attr , related_arg_name = op_args .related_arg_attr
164+ if op_args .arg_relationship is not None :
165+ related_attr , related_arg_name = op_args .arg_relationship
166166 if related_arg_name == arg_name :
167167 attributes .append (
168168 TypeAttr (related_attr .value , arg .analyzed_value )
0 commit comments