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

Improve EndRun handling #904

Merged
merged 6 commits into from
Apr 7, 2024
Merged

Improve EndRun handling #904

merged 6 commits into from
Apr 7, 2024

Conversation

jlowin
Copy link
Member

@jlowin jlowin commented Apr 6, 2024

It is sometimes useful to end a run early after a tool call is made. Historically this could be done by raising a CancelRun error but this was a bit arcane and defeated by any custom exception handling users might put in place (or, say, Prefect). This expands and documents the functionality.

  • renames CancelRun → EndRun
  • adds ENDRUN_TOKEN for functions that must return strings
  • documents how to end a run early

@jlowin jlowin merged commit 76382aa into main Apr 7, 2024
15 checks passed
@jlowin jlowin deleted the end-runs branch April 7, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant