Ë
    ³«Žjí  ã                   ó>  — d dl mZmZmZmZ d dlmZ d dlmZ d dl	Z	d dl
Z
e	j                   G d„ d«      «       Ze	j                   G d„ d«      «       Ze	j                   G d	„ d
«      «       Ze	j                   G d„ d«      «       Ze	j                   G d„ d«      «       Zy)é    )ÚListÚAnyÚOptionalÚDict)ÚOPIK_PROJECT_DEFAULT_NAME)ÚErrorInfoDictNc                   óX   — e Zd ZU dZeed<   eed<   eed<   dZee   ed<   dZ	ee   ed<   y)ÚFeedbackScoreModelaS  
    Represents a model for a feedback score used to evaluate specific spans or traces.

    This class stores and manages feedback scores linked to defined criteria, including
    identifiers, names, values, categories, and explanations for each score.

    Attributes:
        id: Unique identifier for the feedback score.
        name: Name associated with the feedback score.
        value: The numerical value of the feedback score.
        category_name: Category to which the feedback score belongs, if any.
        reason: Reason or explanation for the feedback score, if available.
    ÚidÚnameÚvalueNÚcategory_nameÚreason)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__Úfloatr   r   r   © ó    ú/Users/manta/Documents/Projects/TheRoad-I1/backend/.venv/lib/python3.12/site-packages/opik/message_processing/emulation/models.pyr
   r
   
   s4   … ñð 	ƒGØ
ƒIØƒLØ#'€M8˜C‘=Ó'Ø €FˆHS‰MÔ r   r
   c                   ó:   — e Zd ZU dZeed<   eed<   dZee   ed<   y)ÚAttachmentModelax  
    Represents a model for an attachment associated with a span or trace.

    This class stores metadata about files or data attached to spans or traces,
    including the file path, name, and content type.

    Attributes:
        file_path: Path to the attached file.
        file_name: Name of the attached file.
        content_type: MIME type of the attached file.
    Ú	file_pathÚ	file_nameNÚcontent_type)r   r   r   r   r   r   r   r   r   r   r   r   r   !   s!   … ñ
ð ƒNØƒNØ"&€L(˜3‘-Ô&r   r   c                   ó"  — e Zd ZU dZeed<   ej                  ed<   dZee   ed<   dZ	ee
eef      ed<   dZee
eef      ed<   dZeee      ed<   dZee
eef      ed	<   d
Zeed<   dZee
eef      ed<   dZeej                     ed<   eZeed<    ej,                  e¬«      Zed    ed<    ej,                  e¬«      Zee   ed<   dZee   ed<   dZee   ed<   dZee   ed<   dZee    ed<   dZ!eej                     ed<   dZ"eee#      ed<   y)Ú	SpanModela·  
    Represents a span model used to describe specific points in a process, their metadata,
    and associated data.

    This class is used to store and manipulate structured data for events or
    spans, including metadata, time markers, associated input/output, tags,
    and additional properties. It serves as a representative structure for recording
    and organizing event-specific information, often used in applications like
    logging, distributed tracing, or data processing pipelines.

    Attributes:
        id: Unique identifier for the span.
        start_time: Start time of the span.
        name: Name of the span, if provided.
        input: Input data associated with the span, if any.
        output: Output data associated with the span, if any.
        tags: List of tags linked to the span.
        metadata: Additional metadata for the span.
        type: Type of the span, defaulting to "general".
        usage: Usage-related information for the span.
        end_time: End time of the span, if available.
        project_name: Name of the project the span is associated with,
            defaulting to a predefined project name.
        spans: List of nested spans related to this span.
        feedback_scores: List of feedback scores associated
            with the span.
        model: Model identification used, if applicable.
        provider: Provider of the span or associated services, if any.
        error_info: Error information or diagnostics
            for the span, if applicable.
        total_cost: Total cost incurred associated with this span,
            if relevant.
        last_updated_at: Timestamp of when the span was
            last updated, if available.
    r   Ú
start_timeNr   ÚinputÚoutputÚtagsÚmetadataÚgeneralÚtypeÚusageÚend_timeÚproject_name©Údefault_factoryÚspansÚfeedback_scoresÚmodelÚproviderÚ
error_infoÚ
total_costÚlast_updated_atÚattachments)$r   r   r   r   r   r   Údatetimer   r   r"   r   r   r#   r$   r   r%   r'   r(   r)   r   r*   ÚdataclassesÚfieldÚlistr-   r.   r
   r/   r0   r1   r   r2   r   r3   r4   r   r   r   r   r    r    4   s]  … ñ"ðH 	ƒGØ×!Ñ!Ó!Ø€Dˆ(3‰-ÓØ&*€Eˆ8D˜˜c˜‘NÑ#Ó*Ø'+€FˆHT˜#˜s˜(‘^Ñ$Ó+Ø $€Dˆ(4˜‘9Ñ
Ó$Ø)-€Hˆht˜C ˜H‘~Ñ&Ó-Ø€Dˆ#ÓØ&*€Eˆ8D˜˜c˜‘NÑ#Ó*Ø,0€Hˆhx×(Ñ(Ñ)Ó0Ø1€L#Ó1Ø0˜{×0Ñ0ÀÔF€Eˆ4ÑÓFØ0A°×0AÑ0AÐRVÔ0W€OTÐ,Ñ-ÓWØ€Eˆ8C‰=ÓØ"€Hˆhs‰mÓ"Ø*.€J˜Ñ'Ó.Ø"&€J˜‘Ó&Ø37€OX˜h×/Ñ/Ñ0Ó7Ø37€K˜$˜Ñ/Ñ0Ô7r   r    c                   ó:   — e Zd ZU dZeed<   eed<   eed<   eed<   y)ÚExperimentItemModela˜  
    Represents an experiment item model that links a trace to a dataset item in an experiment.

    Attributes:
        id: Unique identifier for the experiment item.
        experiment_id: The ID of the experiment this item belongs to.
        trace_id: The ID of the trace associated with this experiment item.
        dataset_item_id: The ID of the dataset item associated with this experiment item.
    r   Úexperiment_idÚtrace_idÚdataset_item_idN)r   r   r   r   r   r   r   r   r   r:   r:   o   s   … ñð 	ƒGØÓØƒMØÔr   r:   c                   óÆ  — e Zd ZU dZeed<   ej                  ed<   ee   ed<   eed<   dZee	ee
f      ed<   dZee	ee
f      ed<   dZeee      ed	<   dZee	ee
f      ed
<   dZeej                     ed<    ej"                  e¬«      Zee   ed<    ej"                  e¬«      Zee   ed<   dZee   ed<   dZee   ed<   dZeej                     ed<   dZeee      ed<   y)Ú
TraceModela  
    Represents a trace model that encapsulates data about a trace, its related metadata,
    and associated spans. It is used for tracking and analyzing data during execution
    or processing tasks.

    This class provides a structure to represent trace information, including the start
    and end times, associated project details, input/output data, feedback scores, error
    information, and thread association. It is designed to handle optional fields for
    flexible use across various scenarios.

    Attributes:
        id: Unique identifier for the trace.
        start_time: Timestamp representing the start of the trace.
        name: Optional name for the trace, which can provide a descriptive
            label.
        project_name: Name of the project associated with the trace.
        input: Optional dictionary containing the input data
            associated with the trace.
        output: Optional dictionary containing the output data
            generated by the trace.
        tags: Optional list of tags associated with the trace for
            classification or filtering purposes.
        metadata: Optional metadata providing additional
            information about the trace.
        end_time: Timestamp representing the end of the
            trace.
        spans: List of spans associated with the trace, representing
            individual processing parts or segments within the trace.
        feedback_scores: List of feedback scores associated
            with the trace.
        error_info: Optional dictionary containing information
            about errors encountered during the trace.
        thread_id: Optional identifier of the thread associated with the
            trace.
        last_updated_at: Timestamp for when the trace was
            last updated.
    r   r!   r   r*   Nr"   r#   r$   r%   r)   r+   r-   r.   r1   Ú	thread_idr3   r4   )r   r   r   r   r   r   r5   r   r"   r   r   r#   r$   r   r%   r)   r6   r7   r8   r-   r    r.   r
   r1   r   r@   r3   r4   r   r   r   r   r?   r?      s  … ñ$ðL 	ƒGØ×!Ñ!Ó!Ø
3‰-ÓØÓØ&*€Eˆ8D˜˜c˜‘NÑ#Ó*Ø'+€FˆHT˜#˜s˜(‘^Ñ$Ó+Ø $€Dˆ(4˜‘9Ñ
Ó$Ø)-€Hˆht˜C ˜H‘~Ñ&Ó-Ø,0€Hˆhx×(Ñ(Ñ)Ó0Ø.˜[×.Ñ.¸tÔD€Eˆ4	‰?ÓDØ0A°×0AÑ0AÐRVÔ0W€OTÐ,Ñ-ÓWØ*.€J˜Ñ'Ó.Ø#€Iˆx˜‰}Ó#Ø37€OX˜h×/Ñ/Ñ0Ó7Ø37€K˜$˜Ñ/Ñ0Ô7r   r?   )Útypingr   r   r   r   Úopik.configr   Ú
opik.typesr   r6   r5   Ú	dataclassr
   r   r    r:   r?   r   r   r   Ú<module>rE      s³   ðß ,Ó ,å 1Ý $ã Û ð ×Ñ÷!ð !ó ð!ð, ×Ñ÷'ð 'ó ð'ð$ ×Ñ÷78ð 78ó ð78ðt ×Ñ÷ð ó ðð" ×Ñ÷58ð 58ó ñ58r   