-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathkernel_process_event.py
More file actions
32 lines (21 loc) · 935 Bytes
/
kernel_process_event.py
File metadata and controls
32 lines (21 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) Microsoft. All rights reserved.
from enum import Enum
from typing import Any
from pydantic import ConfigDict
from semantic_kernel.kernel_pydantic import KernelBaseModel
from semantic_kernel.utils.feature_stage_decorator import experimental
@experimental
class KernelProcessEventVisibility(Enum):
"""Visibility of a kernel process event."""
# The event is visible inside the process as well as outside the process. This is useful
# when the event is intended to be consumed by other processes or external systems.
Public = "Public"
# The event is only visible to steps within the same process.
Internal = "Internal"
@experimental
class KernelProcessEvent(KernelBaseModel):
"""A kernel process event."""
id: str
data: Any | None = None
visibility: KernelProcessEventVisibility = KernelProcessEventVisibility.Internal
model_config = ConfigDict(use_enum_values=False)