MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / __init__

Method __init__

camel/models/model_manager.py:58–78  ·  view source on GitHub ↗
(
        self,
        models: Union[BaseModelBackend, List[BaseModelBackend]],
        scheduling_strategy: str = "round_robin",
    )

Source from the content-addressed store, hash-verified

56 """
57
58 def __init__(
59 self,
60 models: Union[BaseModelBackend, List[BaseModelBackend]],
61 scheduling_strategy: str = "round_robin",
62 ):
63 if isinstance(models, list):
64 self.models = models
65 else:
66 self.models = [models]
67 self.models_cycle = cycle(self.models)
68 self.current_model = self.models[0]
69
70 # Set the scheduling strategy; default is round-robin
71 try:
72 self.scheduling_strategy = getattr(self, scheduling_strategy)
73 except AttributeError:
74 logger.warning(
75 f"Provided strategy: {scheduling_strategy} is not implemented."
76 f"Using default 'round robin'"
77 )
78 self.scheduling_strategy = self.round_robin
79
80 @property
81 def model_type(self) -> UnifiedModelType:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected