Skip to content

Commit 8e07372

Browse files
Merge pull request #26 from openai/allow-empty-action-payloads
fix: allow payload on actions to be `undefined` by defaulting to `None`
2 parents d6da556 + ee4063b commit 8e07372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chatkit/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ActionConfig(BaseModel):
2424

2525
class Action(BaseModel, Generic[TType, TPayload]):
2626
type: TType = Field(default=TType, frozen=True) # pyright: ignore
27-
payload: TPayload
27+
payload: TPayload = None # pyright: ignore - default to None to allow no-payload actions
2828

2929
@classmethod
3030
def create(

0 commit comments

Comments
 (0)