spk-22/Context_Aware_Content_Moderation_Environment_using_OpenEnv
0
1# Copyright (c) Meta Platforms, Inc. and affiliates.2# All rights reserved.3#4# This source code is licensed under the BSD-style license found in the5# LICENSE file in the root directory of this source tree.6 7"""8Data models for the Content Moderation Environment.9 10The content_moderation environment is a simple test environment that echoes back messages.11"""12 13 14 15from openenv.core.env_server.types import Action, Observation16from pydantic import Field17from typing import Optional18 19class ContentModerationAction(Action):20 decision: str = Field(..., description="allow | remove | review")21 22 23class ContentModerationObservation(Observation):24 content: str = Field(..., description="The post text")25 context: Optional[str] = Field(None, description="Context of the post")26 intent: Optional[str] = Field(None, description="Underlying intent")27 28 