Commit e6b226a
committed
fix(vLLM): Add tool calling support to VLLMClient.chat()
Fixes #4871
Previously, using GRPOTrainer with `vllm_mode="server"` raised a
`NotImplementedError` when tools were passed to `VLLMClient.chat()`.
This prevented users from using tool calling features with the vLLM
server mode.
Changes:
- Remove the NotImplementedError check in VLLMClient.chat()
- Add `tools` parameter to the HTTP request payload
- Add `tools` field to ChatRequest model in vllm_serve.py
- Pass tools to vLLM's chat() method on the server side1 parent 3066891 commit e6b226a
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | 355 | | |
358 | 356 | | |
359 | 357 | | |
| |||
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
| 384 | + | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
647 | 648 | | |
648 | 649 | | |
649 | 650 | | |
| |||
756 | 757 | | |
757 | 758 | | |
758 | 759 | | |
| 760 | + | |
759 | 761 | | |
760 | 762 | | |
761 | 763 | | |
| |||
0 commit comments