Skip to content

Commit d6b728e

Browse files
Updating path
1 parent dbed1dd commit d6b728e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ads/aqua/extension/model_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def get(self, model_id):
325325
if (
326326
len(path_list) == 4
327327
and is_valid_ocid(path_list[2])
328-
and path_list[3] == "chat_template"
328+
and path_list[3] == "tokenizer"
329329
):
330330
return self.finish(AquaModelApp().get_hf_tokenizer_config(model_id))
331331
else:
@@ -335,6 +335,6 @@ def get(self, model_id):
335335
__handlers__ = [
336336
("model/?([^/]*)", AquaModelHandler),
337337
("model/?([^/]*)/license", AquaModelLicenseHandler),
338-
("model/?([^/]*)/chat_template", AquaModelTokenizerConfigHandler),
338+
("model/?([^/]*)/tokenizer", AquaModelTokenizerConfigHandler),
339339
("model/hf/search/?([^/]*)", AquaHuggingFaceHandler),
340340
]

tests/unitary/with_extras/aqua/test_model_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def setUp(self, ipython_init_mock) -> None:
264264
@patch.object(AquaModelApp, "get_hf_tokenizer_config")
265265
@patch("ads.aqua.extension.model_handler.urlparse")
266266
def test_get(self, mock_urlparse, mock_get_hf_tokenizer_config):
267-
request_path = MagicMock(path="aqua/model/ocid1.xx./chat_template")
267+
request_path = MagicMock(path="aqua/model/ocid1.xx./tokenizer")
268268
mock_urlparse.return_value = request_path
269269
self.model_tokenizer_config_handler.get(model_id="test_model_id")
270270
self.model_tokenizer_config_handler.finish.assert_called_with(

0 commit comments

Comments
 (0)