ModelProcessingError
ModelManager
- models (Union[BaseModelBackend, List[BaseModelBackend]]): model backend or list of model backends (e.g., model instances, APIs)
- scheduling_strategy (str): name of function that defines how to select the next model. (default: :str:
round_robin
)
init
model_type
model_config_dict
model_config_dict
- model_config_dict (Dict[str, Any]): Config dictionary to be set at current model.
current_model_index
num_models
token_limit
token_counter
add_strategy
- name (str): The name of the strategy.
- strategy_fn (Callable): The scheduling strategy function.
round_robin
always_first
random_model
run
- messages (List[OpenAIMessage]): Message list with the chat history in OpenAI API format.
ChatCompletion
in the non-stream mode, or
Stream[ChatCompletionChunk]
in the stream mode, or
ChatCompletionStreamManager[BaseModel]
for
structured-output stream.