Add `condition` to `halt_after` / `halt_before`
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
まず app.run、halt_after、halt_before の実装とテストを見つけます。現在のアクションリストがどのように停止を発生させるかを追跡し、条件付きエントリと無条件エントリのカバレッジを定義します。指定された条件を満たした場合にのみ停止が発生し、条件が指定されていない場合は既存の動作が変わらないことを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Currently, it is not possible to halt the app after a given action iff a condition is met. Here is a motivating example of when it might be needed:
Say you have a chatgpt-like app with various "chats", where each chat is a distinct burr app. When a user starts a new chat, you'd like to have a quick routing step that will detect, based on the first prompt, if the new chat is actually the continuation of a previous chat. If so, we want to halt the current app and restart the relevant app. If not, the app can continue its normal lifecycle.
Describe the solution you'd like
Instead of providing a list of actions to halt_after (or halt_before), provide a list of tuples (action, condition). The application will halt after a given action if and only if condition is met. If no condition is provided, the app will always halt after action is processed (current behavior).
Describe alternatives you've considered
Right now, the alternative is to have a dummy action to halt on and a conditional transition to it.
with_transitions(
("routing_action", "continue_action", when(continue=True)),
("routing_action, "halt_action", when(continue=False))
)
And then when calling app.run:
final_action, result, final_state = app.run(
halt_after=["halt_action"],
inputs={"prompt" : user_input}
)
This is less clean than the suggested API.
Another possible way to address this would be to enable halting the application from within an action, although it may be harder to implement.
- 主要言語
- Python
- スター
- 2.6k
- フォーク
- 208
- 平均マージ
- 8日 9時間
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/burr のほかの issue
-
Notebook UI launcher should use the current Python interpreter対応中かも @sivakumar-mahalingam が 7 日前に担当しました。 オープンstatus/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 4 日以内に返信
-
astep() passes unprocessed inputs to pre_run_step hooks対応中かも @sivakumar-mahalingam が 8 日前に担当しました。 オープンstatus/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
-
`burr` fails to start when the Python path has a space in it対応中かも @enekoreto が 10 日前に担当しました。 オープンstatus/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
area/storage area/ui help wanted kind/documentation priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
-
Add documentation on how to run the Burr UI server対応中かも @iamSerafinnn が 140 日前に担当しました。 オープンarea/ui good first issue kind/documentation priority/low
難易度 2/5 半日 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
yzhao062/awesome-auditable-ai#45 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA/flare-local-inference#90 ·
メンテナーはふだん 1 日以内に返信
-
area/streaming comp/gateway P2 platform/telegram type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#144897 ·
メンテナーはふだん 1 日以内に返信
-
request-theme
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
LizardByte/ThemerrDB#9575 ·
メンテナーはふだん 1 日以内に返信