Commit 70876de
committed
test(model): update ModelProxy tests to use proper mocking and parameters
Update the unit tests for ModelProxy completions and responses methods
to properly mock litellm functions instead of mocking the data client
completions/responses methods. Also correct the test_responses method
to pass the correct 'input' parameter instead of 'messages'.
The changes ensure that the tests accurately reflect how the ModelProxy
interacts with the underlying litellm API while maintaining proper
mocking behavior.
更新 ModelProxy 测试以使用正确的模拟和参数
更新 ModelProxy 完成和响应方法的单元测试,以正确模拟 litellm 函数,
而不是模拟数据客户端的完成/响应方法。同时修正 test_responses 方法,
传递正确的 'input' 参数而不是 'messages'。
这些更改确保测试准确反映 ModelProxy 如何与底层 litellm API 交互,
同时保持适当的模拟行为。
Change-Id: I5fffbf165d23efa7607c2618b1fd9604df3caeb6
Signed-off-by: OhYee <oyohyee@oyohyee.com>1 parent cfffd23 commit 70876de
1 file changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
| 531 | + | |
531 | 532 | | |
532 | 533 | | |
| 534 | + | |
| 535 | + | |
533 | 536 | | |
534 | 537 | | |
535 | | - | |
| 538 | + | |
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
539 | | - | |
540 | 542 | | |
541 | | - | |
| 543 | + | |
542 | 544 | | |
543 | 545 | | |
544 | 546 | | |
545 | 547 | | |
546 | | - | |
| 548 | + | |
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
| |||
557 | 559 | | |
558 | 560 | | |
559 | 561 | | |
560 | | - | |
| 562 | + | |
| 563 | + | |
561 | 564 | | |
562 | 565 | | |
| 566 | + | |
| 567 | + | |
563 | 568 | | |
564 | 569 | | |
565 | | - | |
| 570 | + | |
566 | 571 | | |
567 | 572 | | |
568 | 573 | | |
569 | | - | |
570 | 574 | | |
571 | | - | |
| 575 | + | |
572 | 576 | | |
573 | 577 | | |
574 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
575 | 581 | | |
576 | | - | |
| 582 | + | |
0 commit comments