Commit 4ab9457
* `create_agent`'s `system_prompt` allows `str | SystemMessage`
* added `system_message: SystemMessage` on `ModelRequest`
* `ModelRequest.system_prompt` is a function of `system_message.text`,
now deprecated
* disallow setting `system_prompt` and `system_message`
* `ModelRequest.system_prompt` can still be set (w/ custom setattr) for
custom backwards compat, but the updates just get propogated to the
`ModelRequest.system_message`
---------
Co-authored-by: Chester Curme <[email protected]>
1 parent eb0545a commit 4ab9457
File tree
9 files changed
+1411
-83
lines changed- libs
- langchain_v1
- langchain/agents
- middleware
- tests/unit_tests/agents
- partners/anthropic
- langchain_anthropic/middleware
- tests/unit_tests/middleware
9 files changed
+1411
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
592 | | - | |
593 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
688 | 696 | | |
689 | 697 | | |
690 | 698 | | |
| |||
1088 | 1096 | | |
1089 | 1097 | | |
1090 | 1098 | | |
1091 | | - | |
1092 | | - | |
| 1099 | + | |
| 1100 | + | |
1093 | 1101 | | |
1094 | 1102 | | |
1095 | 1103 | | |
| |||
1108 | 1116 | | |
1109 | 1117 | | |
1110 | 1118 | | |
1111 | | - | |
| 1119 | + | |
1112 | 1120 | | |
1113 | 1121 | | |
1114 | 1122 | | |
| |||
1141 | 1149 | | |
1142 | 1150 | | |
1143 | 1151 | | |
1144 | | - | |
1145 | | - | |
| 1152 | + | |
| 1153 | + | |
1146 | 1154 | | |
1147 | 1155 | | |
1148 | 1156 | | |
| |||
1161 | 1169 | | |
1162 | 1170 | | |
1163 | 1171 | | |
1164 | | - | |
| 1172 | + | |
1165 | 1173 | | |
1166 | 1174 | | |
1167 | 1175 | | |
| |||
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 232 | + | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
| |||
259 | 256 | | |
260 | 257 | | |
261 | 258 | | |
262 | | - | |
263 | | - | |
264 | | - | |
| 259 | + | |
265 | 260 | | |
266 | 261 | | |
267 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | | - | |
| 207 | + | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
214 | 224 | | |
215 | | - | |
| 225 | + | |
0 commit comments