optional_enum_field#
- langchain_experimental.graph_transformers.llm.optional_enum_field(enum_values: List[str] | List[Tuple[str, str, str]] | None = None, description: str = '', input_type: str = 'node', llm_type: str | None = None, relationship_type: str | None = None, **field_kwargs: Any) Any [source]#
Utility function to conditionally create a field with an enum constraint.
- Parameters:
enum_values (List[str] | List[Tuple[str, str, str]] | None)
description (str)
input_type (str)
llm_type (str | None)
relationship_type (str | None)
field_kwargs (Any)
- Return type:
Any