Skip to content

Commit 7124c4c

Browse files
authored
Merge pull request #64 from openai/client-side-effect
ClientEffectEvent
2 parents 675ded1 + a3c67d6 commit 7124c4c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

chatkit/types.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,14 @@ class ProgressUpdateEvent(BaseModel):
339339
text: str
340340

341341

342+
class ClientEffectEvent(BaseModel):
343+
"""Event emitted to trigger a client side-effect."""
344+
345+
type: Literal["client_effect"] = "client_effect"
346+
name: str
347+
data: dict[str, Any] = Field(default_factory=dict)
348+
349+
342350
class ErrorEvent(BaseModel):
343351
"""Event indicating an error occurred while processing a thread."""
344352

@@ -370,6 +378,7 @@ class NoticeEvent(BaseModel):
370378
| ThreadItemReplacedEvent
371379
| StreamOptionsEvent
372380
| ProgressUpdateEvent
381+
| ClientEffectEvent
373382
| ErrorEvent
374383
| NoticeEvent,
375384
Field(discriminator="type"),

0 commit comments

Comments
 (0)