Commit db46726
Fix/update deepseek not support response format (#45)
* fix: fix deepseek llm not support response_format type
* delete comment
* Update llm_request_handler.py with Lint and bug fixes
The condition if self.response_schema and not any(...) has three outcomes folded into two branches:
response_schema exists AND model is not deepseek --> json_schema (correct)
response_schema exists AND model is deepseek --> falls to else, gets json_object (correct)
response_schema is None (any model) --> falls to else, gets json_object (BUG -- previously no response_format was set at all)
The fix: the else with json_object should only apply when we have a schema but the provider doesn't support json_schema. When there's no schema, we should skip response_format entirely (original behavior).
* Update llm_request_handler.py with lint issues
---------
Co-authored-by: pengzy2 <pengzy2@knownsec.com>
Co-authored-by: Vineeth Sai Narajala <vnarajal@cisco.com>1 parent ca5db66 commit db46726
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
222 | 227 | | |
223 | 228 | | |
224 | 229 | | |
| |||
0 commit comments