|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
from typing import Any, Dict, List, Optional, Union
|
|
|
|
|
from typing import Any, Optional, Union
|
|
|
|
|
|
|
|
|
|
from pydantic import BaseModel, Field, field_validator
|
|
|
|
|
from pydantic_core.core_schema import ValidationInfo
|
|
|
|
|
@ -19,9 +19,9 @@ class WeaveMultiModel(BaseModel):
|
|
|
|
|
class WeaveTraceModel(WeaveTokenUsage, WeaveMultiModel):
|
|
|
|
|
id: str = Field(..., description="ID of the trace")
|
|
|
|
|
op: str = Field(..., description="Name of the operation")
|
|
|
|
|
inputs: Optional[Union[str, Dict[str, Any], List, None]] = Field(None, description="Inputs of the trace")
|
|
|
|
|
outputs: Optional[Union[str, Dict[str, Any], List, None]] = Field(None, description="Outputs of the trace")
|
|
|
|
|
attributes: Optional[Union[str, Dict[str, Any], List, None]] = Field(
|
|
|
|
|
inputs: Optional[Union[str, dict[str, Any], list, None]] = Field(None, description="Inputs of the trace")
|
|
|
|
|
outputs: Optional[Union[str, dict[str, Any], list, None]] = Field(None, description="Outputs of the trace")
|
|
|
|
|
attributes: Optional[Union[str, dict[str, Any], list, None]] = Field(
|
|
|
|
|
None, description="Metadata and attributes associated with trace"
|
|
|
|
|
)
|
|
|
|
|
exception: Optional[str] = Field(None, description="Exception message of the trace")
|
|
|
|
|
|