Skip to content

Commit

Permalink
ErrorResponse: add support for error types
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanGraham14 committed Sep 28, 2023
1 parent 79c5a33 commit ce87ca6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fastapi_poe/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Identifier: TypeAlias = str
FeedbackType: TypeAlias = Literal["like", "dislike"]
ContentType: TypeAlias = Literal["text/markdown", "text/plain"]
ErrorType: TypeAlias = Literal["user_message_too_long"]


class MessageFeedback(BaseModel):
Expand Down Expand Up @@ -122,6 +123,7 @@ class ErrorResponse(PartialResponse):
"""Communicate errors from server bots."""

allow_retry: bool = False
error_type: Optional[ErrorType] = None


class MetaResponse(PartialResponse):
Expand Down

0 comments on commit ce87ca6

Please sign in to comment.