Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poebot: improve error response #112

Merged
merged 20 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a152557
add helper to concatenate attachment content to message
JohntheLi Mar 29, 2024
de50de9
fix linter and change enforce author role alternation default to false
JohntheLi Mar 29, 2024
93df94c
update version for release
JohntheLi Mar 29, 2024
8d0bdb9
Merge branch 'main' of https://github.com/JohntheLi/fastapi_poe
JohntheLi Apr 17, 2024
c15b08e
add enable_multi_bot_chat_prompting setting and increase default timeout
JohntheLi Apr 17, 2024
9554776
update pyproject version
JohntheLi Apr 17, 2024
71f7b4f
Merge branch 'main' of https://github.com/JohntheLi/fastapi_poe
JohntheLi May 1, 2024
08d86f3
poe bot attachments: insert attachments in new messages
JohntheLi May 4, 2024
8d04623
update the pyproject version
JohntheLi May 4, 2024
b5895c1
unit tests: remove 3.7 test from arm64
JohntheLi May 4, 2024
d15b44e
protocol messages: add sender_id
JohntheLi May 15, 2024
f88defd
Merge branch 'poe-platform:main' into main
JohntheLi May 15, 2024
4044cbb
update pyproject to 0.0.44 for release
JohntheLi May 15, 2024
d87eebe
add default value as None for sender_id
JohntheLi May 15, 2024
697b15b
Merge branch 'main' of https://github.com/JohntheLi/fastapi_poe
JohntheLi Jun 10, 2024
0b9adb7
Add language_code and raw_response
JohntheLi Jun 10, 2024
19f5488
fix some docs
JohntheLi Jun 10, 2024
db88084
Merge branch 'main' of https://github.com/JohntheLi/fastapi_poe
JohntheLi Jul 1, 2024
c4979b1
poebot: improve error responses
JohntheLi Jul 2, 2024
f279bcf
update pyproject version for release
JohntheLi Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fastapi_poe"
version = "0.0.45"
version = "0.0.46"
authors = [
{ name="Lida Li", email="lli@quora.com" },
{ name="Jelle Zijlstra", email="jelle@quora.com" },
Expand Down
12 changes: 10 additions & 2 deletions src/fastapi_poe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,20 @@ async def handle_query(
yield self.text_event(event.text)
except Exception as e:
logger.exception("Error responding to query")
yield self.error_event(repr(e), allow_retry=False)
yield self.error_event(
"The bot encountered an unexpected issue.",
raw_response=e,
allow_retry=False,
)
try:
await self._process_pending_attachment_requests(request.message_id)
except Exception as e:
logger.exception("Error processing pending attachment requests")
yield self.error_event(repr(e), allow_retry=False)
yield self.error_event(
"The bot encountered an unexpected issue.",
raw_response=e,
allow_retry=False,
)
yield self.done_event()


Expand Down
Loading