Commit 67eb838
committed
refactor(core): add tool_use instructions only when needed
Previously, tool_use instructions were always appended to the system prompt,
even when no tools were selected. This change moves the logic to add
tool_use instructions to the ask function, ensuring they are included only
when selected_tools is not empty. This optimizes prompt construction and
prevents unnecessary instructions from being sent to the model.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>1 parent a88874e commit 67eb838
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | 567 | | |
571 | 568 | | |
572 | 569 | | |
| |||
828 | 825 | | |
829 | 826 | | |
830 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
| |||
0 commit comments