Repository navigation
Commit 8e7d990
feat: Add MALFORMED_RESPONSE to FinishReason
Java: GenerateContentResponse.text(), parts() and the other helpers that call checkFinishReason() now throw IllegalArgumentException for MALFORMED_RESPONSE, as they already do for MALFORMED_FUNCTION_CALL. Previously the value mapped to FINISH_REASON_UNSPECIFIED and did not throw.
fixes #2937
PiperOrigin-RevId: 10032162521 parent 0f688a6 commit 8e7d990
2 files changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1095 | 1096 | | |
1096 | 1097 | | |
1097 | 1098 | | |
1098 | | - | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| |||
2768 | 2768 | | |
2769 | 2769 | | |
2770 | 2770 | | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2771 | 2793 | | |
2772 | 2794 | | |
2773 | 2795 | | |
| |||
2969 | 2991 | | |
2970 | 2992 | | |
2971 | 2993 | | |
2972 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| |||
0 commit comments