MCPcopy Create free account
hub / github.com/Bytez-com/docs / test_params_with_kwargs

Method test_params_with_kwargs

sdk/python/test.py:36–49  ·  view source on GitHub ↗

Test running a model with parameters.

(self)

Source from the content-addressed store, hash-verified

34 self.assertIsInstance(result.output, str, "returns output")
35
36 def test_params_with_kwargs(self):
37 """Test running a model with parameters."""
38 input_text = "Jack and Jill "
39 result = model.run(
40 input_text, params={"min_new_tokens": 1, "max_new_tokens": 1}
41 )
42
43 self.assertIsNone(result.error)
44 self.assertIsInstance(result.output, str, "returns output")
45 self.assertEqual(
46 len(result.output.split(" ")),
47 len(input_text.strip().split(" ")) + 1,
48 "returns output",
49 )
50 def test_params(self):
51 """Test running a model with parameters."""
52 input_text = "Jack and Jill "

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected