1- import mellea
1+ import pytest
2+
23from mellea import MelleaSession , generative
34from mellea .backends import ModelOption
45from mellea .backends .litellm import LiteLLMBackend
910class TestLitellmOllama :
1011 m = MelleaSession (LiteLLMBackend ())
1112
13+ @pytest .mark .qualitative
1214 def test_litellm_ollama_chat (self ):
1315 res = self .m .chat ("hello world" )
1416 assert res is not None
1517 assert isinstance (res , Message )
1618
19+ @pytest .mark .qualitative
1720 def test_litellm_ollama_instruct (self ):
1821 res = self .m .instruct (
1922 "Write an email to the interns." ,
@@ -23,6 +26,7 @@ def test_litellm_ollama_instruct(self):
2326 assert res is not None
2427 assert isinstance (res .value , str )
2528
29+ @pytest .mark .qualitative
2630 def test_litellm_ollama_instruct_options (self ):
2731 res = self .m .instruct (
2832 "Write an email to the interns." ,
@@ -32,7 +36,7 @@ def test_litellm_ollama_instruct_options(self):
3236 ModelOption .TEMPERATURE : 0.5 ,
3337 ModelOption .THINKING : True ,
3438 ModelOption .MAX_NEW_TOKENS : 100 ,
35- "reasoning_effort" :True ,
39+ "reasoning_effort" : True ,
3640 "stream" : False ,
3741 "homer_simpson" : "option should be kicked out" ,
3842 },
@@ -41,6 +45,7 @@ def test_litellm_ollama_instruct_options(self):
4145 assert isinstance (res .value , str )
4246 assert "homer_simpson" not in self .m .ctx .last_output_and_logs ()[1 ].model_options
4347
48+ @pytest .mark .qualitative
4449 def test_gen_slot (self ):
4550 @generative
4651 def is_happy (text : str ) -> bool :
0 commit comments