mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-15 23:42:37 +00:00
cleanup: remove dead _entity_discriminator and CheckpointPayload
This commit is contained in:
@@ -9,7 +9,7 @@ via ``RuntimeState.model_rebuild()``.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, TypedDict
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from pydantic import (
|
||||
ModelWrapValidatorHandler,
|
||||
@@ -29,19 +29,6 @@ if TYPE_CHECKING:
|
||||
from crewai import Entity
|
||||
|
||||
|
||||
class CheckpointPayload(TypedDict):
|
||||
entities: list[Entity]
|
||||
event_record: dict[str, Any]
|
||||
|
||||
|
||||
def _entity_discriminator(v: dict[str, Any] | object) -> str:
|
||||
if isinstance(v, dict):
|
||||
raw = v.get("entity_type", "agent")
|
||||
else:
|
||||
raw = getattr(v, "entity_type", "agent")
|
||||
return str(raw)
|
||||
|
||||
|
||||
def _sync_checkpoint_fields(entity: object) -> None:
|
||||
"""Copy private runtime attrs into checkpoint fields before serializing.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user