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

Method __init__

sdk/python/bytez/model.py:10–28  ·  view source on GitHub ↗

Initialize a model instance. Args: model_id (str): The model ID, e.g., `openai-community/gpt2`. bytez (Bytez): The Bytez API client instance. client (Client): The internal request client. provider_key (str, optional): closed source mo

(self, model_id: str, bytez, client: Client, provider_key: str = None)

Source from the content-addressed store, hash-verified

8 """
9
10 def __init__(self, model_id: str, bytez, client: Client, provider_key: str = None):
11 """
12 Initialize a model instance.
13
14 Args:
15 model_id (str): The model ID, e.g., `openai-community/gpt2`.
16 bytez (Bytez): The Bytez API client instance.
17 client (Client): The internal request client.
18 provider_key (str, optional): closed source model provider key
19 """
20 self._client = client
21 self.provider_key: str = provider_key
22 self.id: str = model_id # The modelId, for example `openai-community/gpt2`
23 self.details: Dict = {} # Details about the model
24 self._is_generating_media: bool = (
25 False # Whether the model generates media output
26 )
27 self._bytez = bytez
28 self._ready = False
29
30 def _initialize(self):
31 """Fetch model details and set up internal state."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected