Add `condition` to `halt_after` / `halt_before`
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Inizia individuando l’implementazione e i test per app.run, halt_after e halt_before. Traccia il modo in cui gli elenchi di azioni correnti attivano l’arresto, quindi definisci la copertura per le voci condizionali e incondizionate; il lavoro è completato quando l’arresto avviene solo se la condizione fornita è soddisfatta, mentre il comportamento esistente rimane invariato quando non viene fornita alcuna condizione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 208
- Merge medio
- 8g 9h
- PR unite (30g)
- 26
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/burr
-
Notebook UI launcher should use the current Python interpreterForse già presa @sivakumar-mahalingam l’ha presa 8 giorni fa. Apertastatus/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 4 giorni
-
astep() passes unprocessed inputs to pre_run_step hooksForse già presa @sivakumar-mahalingam l’ha presa 8 giorni fa. Apertastatus/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
`burr` fails to start when the Python path has a space in itForse già presa @enekoreto l’ha presa 10 giorni fa. Apertastatus/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 4 giorni
-
area/storage area/ui help wanted kind/documentation priority/low
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/burr#524 · 11 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Add documentation on how to run the Burr UI serverForse già presa @iamSerafinnn l’ha presa 140 giorni fa. Apertaarea/ui good first issue kind/documentation priority/low
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
apache/burr#272 · 5 commenti ·
I maintainer di solito rispondono entro 4 giorni
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
521xueweihan/HelloGitHub#4115 ·
-
get_lldp_neighbors_detail: query asks for 'max-address' (typo for 'mac-address'), so remote_chassis_id is always emptyForse già presa @Jah-yee l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
lesson-submission pending-review
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
Ikalus1988/MisakaNet#3899 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
aws-samples/sample-per-model-bedrock#549 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100