File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ def get(self, model_id):
325
325
if (
326
326
len (path_list ) == 4
327
327
and is_valid_ocid (path_list [2 ])
328
- and path_list [3 ] == "chat_template "
328
+ and path_list [3 ] == "tokenizer "
329
329
):
330
330
return self .finish (AquaModelApp ().get_hf_tokenizer_config (model_id ))
331
331
else :
@@ -335,6 +335,6 @@ def get(self, model_id):
335
335
__handlers__ = [
336
336
("model/?([^/]*)" , AquaModelHandler ),
337
337
("model/?([^/]*)/license" , AquaModelLicenseHandler ),
338
- ("model/?([^/]*)/chat_template " , AquaModelTokenizerConfigHandler ),
338
+ ("model/?([^/]*)/tokenizer " , AquaModelTokenizerConfigHandler ),
339
339
("model/hf/search/?([^/]*)" , AquaHuggingFaceHandler ),
340
340
]
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ def setUp(self, ipython_init_mock) -> None:
264
264
@patch .object (AquaModelApp , "get_hf_tokenizer_config" )
265
265
@patch ("ads.aqua.extension.model_handler.urlparse" )
266
266
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 " )
268
268
mock_urlparse .return_value = request_path
269
269
self .model_tokenizer_config_handler .get (model_id = "test_model_id" )
270
270
self .model_tokenizer_config_handler .finish .assert_called_with (
You can’t perform that action at this time.
0 commit comments