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

Method test_params

sdk/python/test.py:50–63  ·  view source on GitHub ↗

Test running a model with parameters.

(self)

Source from the content-addressed store, hash-verified

48 "returns output",
49 )
50 def test_params(self):
51 """Test running a model with parameters."""
52 input_text = "Jack and Jill "
53 result = model.run(
54 input_text, {"min_new_tokens": 1, "max_new_tokens": 1}
55 )
56
57 self.assertIsNone(result.error)
58 self.assertIsInstance(result.output, str, "returns output")
59 self.assertEqual(
60 len(result.output.split(" ")),
61 len(input_text.strip().split(" ")) + 1,
62 "returns output",
63 )
64 def test_stream_kwargs(self):
65 """Test streaming text."""
66 stream = model.run("Jack and jill", stream=True)

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected