Commit 6566529
feat: LLM - Improved the handling of temperature and top_p in streaming
The `temperature` and `top_p` parameters have `float` type. However some people might pass integer values to these parameters. The streaming API is sensitive to the `int` vs. `float` parameter type and will throw an error. This CL mitigates that by converting integer values to floats.
PiperOrigin-RevId: 5627386761 parent 50c1591 commit 6566529
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
| 763 | + | |
762 | 764 | | |
763 | 765 | | |
764 | 766 | | |
| 767 | + | |
| 768 | + | |
765 | 769 | | |
766 | 770 | | |
767 | 771 | | |
| |||
1389 | 1393 | | |
1390 | 1394 | | |
1391 | 1395 | | |
| 1396 | + | |
| 1397 | + | |
1392 | 1398 | | |
1393 | 1399 | | |
1394 | 1400 | | |
1395 | 1401 | | |
| 1402 | + | |
| 1403 | + | |
1396 | 1404 | | |
1397 | 1405 | | |
1398 | 1406 | | |
| |||
1749 | 1757 | | |
1750 | 1758 | | |
1751 | 1759 | | |
| 1760 | + | |
| 1761 | + | |
1752 | 1762 | | |
1753 | 1763 | | |
1754 | 1764 | | |
| |||
0 commit comments