haive.agents.document_modifiers.tnt.models ========================================== .. py:module:: haive.agents.document_modifiers.tnt.models .. autoapi-nested-parse:: Data models for taxonomy generation. This module defines the core data structures used in the taxonomy generation process, particularly the document model that represents individual pieces of content being processed. .. rubric:: Examples Basic usage of document model:: doc = Doc( id="doc1", content="Sample text", summary="Brief summary", explanation="Summary rationale", category="Technology" ) Classes ------- .. autoapisummary:: haive.agents.document_modifiers.tnt.models.Doc Module Contents --------------- .. py:class:: Doc(/, **data) Bases: :py:obj:`pydantic.BaseModel` Represents a single document or chat log in the taxonomy generation process. This class serves as the fundamental data structure for content being processed through the taxonomy generation workflow. It tracks both the original content and metadata added during processing. .. attribute:: id Unique identifier for the document, used for tracking and reference. :type: str .. attribute:: content Original text content of the document or chat log. :type: str .. attribute:: summary Condensed version of the content, generated in the first step of processing. Defaults to empty string. :type: Optional[str] .. attribute:: explanation Rationale for how the summary was generated, added alongside the summary. Defaults to empty string. :type: Optional[str] .. attribute:: category Taxonomy category assigned to the document in later stages of processing. Defaults to empty string. :type: Optional[str] .. rubric:: Examples >>> doc = Doc( ... id="chat_123", ... content="User asked about Python installation", ... summary="Python setup inquiry", ... explanation="Focused on main topic", ... category="Technical Support" ... ) Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:method:: from_document(document) :classmethod: From Document. :param document: [TODO: Add description] :returns: Add return description] :rtype: [TODO