(self)
| 1531 | ) |
| 1532 | class TestAPIServerToolCall(VLLMTestBase): |
| 1533 | async def asyncSetUp(self): |
| 1534 | self.config = get_template_config() |
| 1535 | self.config.mode = "explore" |
| 1536 | self.config.model.model_path = get_api_model_path() |
| 1537 | self.config.explorer.rollout_model.engine_type = "vllm" |
| 1538 | self.config.explorer.rollout_model.engine_num = 1 |
| 1539 | self.config.explorer.rollout_model.tensor_parallel_size = 1 |
| 1540 | self.config.explorer.rollout_model.chat_template = CHAT_TEMPLATE |
| 1541 | self.config.explorer.rollout_model.enable_openai_api = True |
| 1542 | self.config.explorer.rollout_model.enable_history = True |
| 1543 | # added for toolcalls |
| 1544 | self.config.explorer.rollout_model.enable_auto_tool_choice = True |
| 1545 | self.config.explorer.rollout_model.tool_call_parser = "hermes" |
| 1546 | self.config.explorer.rollout_model.enable_thinking = self.enable_thinking |
| 1547 | self.config.explorer.rollout_model.reasoning_parser = self.reasoning_parser |
| 1548 | |
| 1549 | self.config.check_and_update() |
| 1550 | self.engines, self.auxiliary_engines = await create_test_models(self.config) |
| 1551 | self.model_wrapper = self.engines[0] |
| 1552 | self.model_wrapper_no_history = clone_wrapper(self.model_wrapper, enable_history=False) |
| 1553 | |
| 1554 | async def test_api_tool_calls(self): |
| 1555 | """Tests the full conversation flow of a tool call via the OpenAI API. |
nothing calls this directly
no test coverage detected