Commit 8b18374
authored
[BUG] Fix json_schema method in the with_structured_output function. (#54)
* Fix with_structured_output json_schema method
Fix json_schema method in the with_structured_output function.
* Remove import and define an alias for the class in the init
Remove import and define an alias for the class in the init
* Set default structured output method to function_calling
Changed the default method for structured output in ChatOCIGenAI from 'json_schema' to 'function_calling'. Updated documentation to clarify the default and suggest alternatives if it fails.
* Fix assertions in unit tests to match the new json_schema method in with_structured_output
* Clarify with_structured_output methods in README
Clarify with_structured_output methods in README1 parent 8151628 commit 8b18374
File tree
3 files changed
+47
-17
lines changed- libs/oci
- langchain_oci/chat_models
- tests/unit_tests/chat_models
3 files changed
+47
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
64 | 82 | | |
65 | 83 | | |
66 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
588 | 591 | | |
589 | 592 | | |
590 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
591 | 598 | | |
592 | 599 | | |
593 | 600 | | |
| |||
1230 | 1237 | | |
1231 | 1238 | | |
1232 | 1239 | | |
1233 | | - | |
1234 | | - | |
| 1240 | + | |
| 1241 | + | |
1235 | 1242 | | |
1236 | 1243 | | |
1237 | 1244 | | |
1238 | 1245 | | |
1239 | 1246 | | |
1240 | | - | |
| 1247 | + | |
1241 | 1248 | | |
1242 | 1249 | | |
1243 | 1250 | | |
| |||
1288 | 1295 | | |
1289 | 1296 | | |
1290 | 1297 | | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
| 1298 | + | |
| 1299 | + | |
1295 | 1300 | | |
1296 | 1301 | | |
1297 | 1302 | | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
1302 | | - | |
1303 | | - | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1304 | 1316 | | |
1305 | 1317 | | |
1306 | 1318 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | | - | |
479 | | - | |
| 478 | + | |
| 479 | + | |
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| |||
0 commit comments