MCPcopy Index your code
hub / github.com/Bytez-com/docs / _initialize

Method _initialize

sdk/python/bytez/model.py:30–42  ·  view source on GitHub ↗

Fetch model details and set up internal state.

(self)

Source from the content-addressed store, hash-verified

28 self._ready = False
29
30 def _initialize(self):
31 """Fetch model details and set up internal state."""
32 result = self._bytez.list.models({"modelId": self.id})
33 media_generators = {
34 "text-to-audio",
35 "text-to-image",
36 "text-to-video",
37 "text-to-speech",
38 }
39
40 self.details = result.output[0] if result.output else {}
41 self._is_generating_media = self.details.get("task") in media_generators
42 self._ready = True
43
44 def run(
45 self,

Callers 1

runMethod · 0.95

Calls 1

modelsMethod · 0.80

Tested by

no test coverage detected