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

[feature request] 続きを出力ボタン (continue button) #53

Closed
ysekiy opened this issue Oct 10, 2023 · 4 comments
Closed

[feature request] 続きを出力ボタン (continue button) #53

ysekiy opened this issue Oct 10, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ysekiy
Copy link

ysekiy commented Oct 10, 2023

概要

「続きを出力」ボタンの実装をしてほしい

背景

出力に 30 秒以上かかるリクエストがユーザーから入力された場合、30秒経過後 「回答中にエラーが発生しました。」と出力が消えてしまいます。

再現手順

入力はながければなんでもいいのですが、例えば: https://qiita.com/kei31/items/82356c4130b3ab627d32 を入力します。

下記の図のように途中まで出力されます。
Screenshot 2023-10-10 at 19 57 36

29秒後画面出力がクリアされ、「回答中にエラーが発生しました。」と表示されます。
Screenshot 2023-10-10 at 19 54 48

Screenshot 2023-10-10 at 19 55 45

根本原因は api-gw と lambda間の統合が max 29秒であることだと考えられます。
https://stackoverflow.com/questions/61617193/aws-api-gateway-websocket-timeout でも同じ議論が見えます。
Screenshot 2023-10-10 at 19 56 13

期待する機能

ユーザー入力+途中まで出力された結果を記録し、再度推論させれば、続きが出力されると思うので、「続きを出力」させる機能がほしい。

{message: "Endpoint request timed out" をキャッチした場合は、以下の図のように「続きを出力」をさせるボタンを出してほしい
Screenshot 2023-10-10 at 19 52 10

@statefb
Copy link
Contributor

statefb commented Oct 16, 2023

方針: https://github.com/aws-samples/aws-serverless-openai-chatbot-demo/blob/main/v2-websocket/README.md
10/Eまでに修正(目標)

@statefb
Copy link
Contributor

statefb commented Oct 24, 2023

@ysekiy
下記リリースにて対応しました
https://github.com/aws-samples/bedrock-claude-chat/releases/tag/v0.2.1

30秒以上かかるレスポンスに対応しています。max_tokensで終了する場合はconfig.pyをご調整いただくか、「続けて」などの文言でご対応いただければと存じます。「Continue generating」のボタンはひとまず本Issueでの対応は見送らせていただきました。

上記対応で難しい場合はまた別途Issue立てていただければと存じますmm

@statefb statefb closed this as completed Oct 24, 2023
@ysekiy
Copy link
Author

ysekiy commented Oct 24, 2023

ありがとうございます!非常に助かります!

@statefb
Copy link
Contributor

statefb commented Jun 27, 2024

Implemented on #401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants