Skip to content

Commit

Permalink
feat: add None default value to nullable response properties (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jan 4, 2024
1 parent 7c60904 commit da423db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/anthropic/types/beta/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Message(BaseModel):
This will always be `"assistant"`.
"""

stop_reason: Optional[Literal["end_turn", "max_tokens", "stop_sequence"]]
stop_reason: Optional[Literal["end_turn", "max_tokens", "stop_sequence"]] = None
"""The reason that we stopped.
This may be one the following values:
Expand All @@ -79,7 +79,7 @@ class Message(BaseModel):
null in the `message_start` event and non-null otherwise.
"""

stop_sequence: Optional[str]
stop_sequence: Optional[str] = None
"""Which custom stop sequence was generated.
This value will be non-null if one of your custom stop sequences was generated.
Expand Down
4 changes: 2 additions & 2 deletions src/anthropic/types/beta/message_delta_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


class Delta(BaseModel):
stop_reason: Optional[Literal["end_turn", "max_tokens", "stop_sequence"]]
stop_reason: Optional[Literal["end_turn", "max_tokens", "stop_sequence"]] = None

stop_sequence: Optional[str]
stop_sequence: Optional[str] = None


class MessageDeltaEvent(BaseModel):
Expand Down

0 comments on commit da423db

Please sign in to comment.