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

Feat: Allow onStepFinish to optionally mutate AI Execution Context #5450

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

theswerd
Copy link
Contributor

This is a prototype for a feature I really want in the ai sdk. I want to be able to dynamically change the environment of the execution during execution runs, including everything around the message history.

use case for us is changing environment variables in code execution, but i think it could also be useful for changing the model dynamically based on arbitrary params, or changing the job based in the system prompt.

Using this I can make the AI get progressively ruder in the system prompt after someone runs out of credits.

Don't think its mergable yet, just putting it here for thoughts

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