cuery.tools.flex.classify ========================= .. py:module:: cuery.tools.flex.classify Attributes ---------- .. autoapisummary:: cuery.tools.flex.classify.PROMPT Classes ------- .. autoapisummary:: cuery.tools.flex.classify.Classifier Functions --------- .. autoapisummary:: cuery.tools.flex.classify.prompt_definitions cuery.tools.flex.classify.make_category_model Module Contents --------------- .. py:data:: PROMPT :value: '' .. py:function:: prompt_definitions(categories) Generate the definitions section for the entity extraction prompt. .. py:function:: make_category_model(categories) Dynamically create a response model for a score based on provided parameters. .. py:class:: Classifier(/, **data) Bases: :py:obj:`cuery.tools.flex.base.FlexTool` Zero-shot classify a data record with arbitrary attributes. .. py:attribute:: categories :type: dict[str, str] Dictionary of category labels and their descriptions. .. py:attribute:: instructions :type: str :value: '' Additional instructions (context) for the classification task. .. py:property:: prompt :type: cuery.Prompt Defines the prompt for this tool (ClassVar or property). .. py:property:: response_model :type: cuery.ResponseClass Defines the response model for this tool (ClassVar or property).