File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,18 @@ def test_abstract_model_tokenizer_api(base_model: BaseModel):
56
56
encoded = base_model .tok_encode ("Hi there!" )
57
57
assert isinstance (encoded , list ) and isinstance (encoded [0 ], int )
58
58
59
- encoded = base_model .tok_encode (ChatCompletionInputMessage ("user" , "Hi there!" ))
60
- assert encoded == base_model .tok_encode ([ChatCompletionInputMessage ("user" , "Hi there!" )])
59
+ encoded = base_model .tok_encode (ChatCompletionInputMessage (role = "user" , content = "Hi there!" ))
60
+ assert encoded == base_model .tok_encode ([ChatCompletionInputMessage (role = "user" , content = "Hi there!" )])
61
61
assert isinstance (encoded , list ) and isinstance (encoded [0 ], int )
62
62
63
63
assert isinstance (
64
64
base_model .tok_encode (["Hi there!" , "Hello there!" ]),
65
65
BatchEncoding ,
66
66
)
67
67
68
- assert isinstance (base_model .tok_encode ([[ChatCompletionInputMessage ("user" , "Hi there!" )]]), BatchEncoding )
68
+ assert isinstance (
69
+ base_model .tok_encode ([[ChatCompletionInputMessage (role = "user" , content = "Hi there!" )]]), BatchEncoding
70
+ )
69
71
70
72
71
73
class TestBaseModel :
You can’t perform that action at this time.
0 commit comments