bindings/python: type assert

This commit is contained in:
Aaron Miller 2023-06-30 16:17:46 -07:00 committed by AT
parent 57dc0c8953
commit 3599663a22

View File

@ -87,7 +87,7 @@ def test_inference_falcon():
model = GPT4All(model_name='ggml-model-gpt4all-falcon-q4_0.bin') model = GPT4All(model_name='ggml-model-gpt4all-falcon-q4_0.bin')
prompt = 'hello' prompt = 'hello'
output = model.generate(prompt) output = model.generate(prompt)
assert isinstance(output, str)
assert len(output) > 0 assert len(output) > 0
@ -95,4 +95,5 @@ def test_inference_mpt():
model = GPT4All(model_name='ggml-mpt-7b-chat.bin') model = GPT4All(model_name='ggml-mpt-7b-chat.bin')
prompt = 'hello' prompt = 'hello'
output = model.generate(prompt) output = model.generate(prompt)
assert isinstance(output, str)
assert len(output) > 0 assert len(output) > 0