- Notifications
You must be signed in to change notification settings - Fork 1.5k
Insert agent instructions after system_prompts for models that don't natively support instructions #3614
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
Insert agent instructions after system_prompts for models that don't natively support instructions #3614
Conversation
DouweM left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@siddhantbhagat8 Thanks Siddhant! Please look at my notes and add a test in test_agent.py, by using both system_prompt and instructions decorators on one agent
I believe I have addressed the core logic feedback as per my understanding :) |
| @DouweM Sorry for bothering you but would love to get this over the line! |
| @siddhantbhagat8 Sorry about the delay, I was at a conference last week and got a bit behind on PR review! |
4bcb9fc to b6144bb Compare | @DouweM Hope you had a great conference! |
| I believe the tests are failing due to connection timeouts and not because of the contents of the PR. Let me know if this PR is resulting in the failing tests |
| @DouweM addressed the feedback! |
instructions after system_prompts for models that don't natively support instructions | @siddhantbhagat8 Thanks Siddhant! |
| @DouweM thanks for approving and merging! |
| @siddhantbhagat8 We release every day, so should be going up in a few hours :) |
Description
Changed the insertion logic to insert instructions after all system prompt parts
Simple append:
anthropic.pygoogle.pygemini.pybedrock.pyInsert at a particular position:
For models that build a messages list, count
SystemPromptPartinstances and insert at that indexopenai.pycohere.pygroq.pymistral.pyhuggingface.pyTesting
I ran the tests locally, everything passed. If I should add a test for this change, please let me know the correct location for the test :)