Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Auto-update documentation after merge

camel-docs-bot9039aa7afd75
diff --git a/docs/reference/camel.agents.chat_agent.md b/docs/reference/camel.agents.chat_agent.md
index ef98894bd..0d6f53318 100644
--- a/docs/reference/camel.agents.chat_agent.md
+++ b/docs/reference/camel.agents.chat_agent.md
@@ -1,5 +1,219 @@
<a id="camel.agents.chat_agent"></a>
+<a id="camel.agents.chat_agent.StreamContentAccumulator"></a>
+
+## StreamContentAccumulator
+
+```python
+class StreamContentAccumulator:
+```
+
+Manages content accumulation across streaming responses to ensure
+all responses contain complete cumulative content.
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.__init__"></a>
+
+### __init__
+
+```python
+def __init__(self):
+```
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.set_base_content"></a>
+
+### set_base_content
+
+```python
+def set_base_content(self, content: str):
+```
+
+Set the base content (usually empty or pre-tool content).
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.add_streaming_content"></a>
+
+### add_streaming_content
+
+```python
+def add_streaming_content(self, new_content: str):
+```
+
+Add new streaming content.
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.add_tool_status"></a>
+
+### add_tool_status
+
+```python
+def add_tool_status(self, status_message: str):
+```
+
+Add a tool status message.
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.get_full_content"></a>
+
+### get_full_content
+
+```python
+def get_full_content(self):
+```
+
+Get the complete accumulated content.
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.get_content_with_new_status"></a>
+
+### get_content_with_new_status
+
+```python
+def get_content_with_new_status(self, status_message: str):
+```
+
+Get content with a new status message appended.
+
+<a id="camel.agents.chat_agent.StreamContentAccumulator.reset_streaming_content"></a>
+
+### reset_streaming_content
+
+```python
+def reset_streaming_content(self):
+```
+
+Reset only the streaming content, keep base and tool status.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse"></a>
+
+## StreamingChatAgentResponse
+
+```python
+class StreamingChatAgentResponse:
+```
+
+A wrapper that makes streaming responses compatible with
+non-streaming code.
+
+This class wraps a Generator[ChatAgentResponse, None, None] and provides
+the same interface as ChatAgentResponse, so existing code doesn't need to
+change.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.__init__"></a>
+
+### __init__
+
+```python
+def __init__(self, generator: Generator[ChatAgentResponse, None, None]):
+```
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse._ensure_latest_response"></a>
+
+### _ensure_latest_response
+
+```python
+def _ensure_latest_response(self):
+```
+
+Ensure we have the latest response by consuming the generator.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.msgs"></a>
+
+### msgs
+
+```python
+def msgs(self):
+```
+
+Get messages from the latest response.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.terminated"></a>
+
+### terminated
+
+```python
+def terminated(self):
+```
+
+Get terminated status from the latest response.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.info"></a>
+
+### info
+
+```python
+def info(self):
+```
+
+Get info from the latest response.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.msg"></a>
+
+### msg
+
+```python
+def msg(self):
+```
+
+Get the single message if there's exactly one message.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.__iter__"></a>
+
+### __iter__
+
+```python
+def __iter__(self):
+```
+
+Make this object iterable.
+
+<a id="camel.agents.chat_agent.StreamingChatAgentResponse.__getattr__"></a>
+
+### __getattr__
+
+```python
+def __getattr__(self, name):
+```
+
+Forward any other attribute access to the latest response.
+
+<a id="camel.agents.chat_agent.AsyncStreamingChatAgentResponse"></a>
+
+## AsyncStreamingChatAgentResponse
+
+```python
+class AsyncStreamingChatAgentResponse:
+```
+
+A wrapper that makes async streaming responses awaitable and
+compatible with non-streaming code.
+
+This class wraps an AsyncGenerator[ChatAgentResponse, None] and provides
+both awaitable and async iterable interfaces.
+
+<a id="camel.agents.chat_agent.AsyncStreamingChatAgentResponse.__init__"></a>
+
+### __init__
+
+```python
+def __init__(self, async_generator: AsyncGenerator[ChatAgentResponse, None]):
+```
+
+<a id="camel.agents.chat_agent.AsyncStreamingChatAgentResponse.__await__"></a>
+
+### __await__
+
+```python
+def __await__(self):
+```
+
+Make this object awaitable - returns the final response.
+
+<a id="camel.agents.chat_agent.AsyncStreamingChatAgentResponse.__aiter__"></a>
+
+### __aiter__
+
+```python
+def __aiter__(self):
+```
+
+Make this object async iterable.
+
<a id="camel.agents.chat_agent.ChatAgent"></a>
## ChatAgent
@@ -23,6 +237,7 @@ Class for managing conversations of CAMEL Chat Agents.
- **max_iteration** (Optional[int], optional): Maximum number of model calling iterations allowed per step. If `None` (default), there's no explicit limit. If `1`, it performs a single model call. If `N > 1`, it allows up to N model calls. (default: :obj:`None`)
- **agent_id** (str, optional): The ID of the agent. If not provided, a random UUID will be generated. (default: :obj:`None`)
- **stop_event** (Optional[threading.Event], optional): Event to signal termination of the agent's operation. When set, the agent will terminate its execution. (default: :obj:`None`)
+- **tool_execution_timeout** (Optional[float], optional): Timeout for individual tool execution. If None, wait indefinitely.
- **mask_tool_output** (Optional[bool]): Whether to return a sanitized placeholder instead of the raw tool output. (default: :obj:`False`)
- **pause_event** (Optional[asyncio.Event]): Event to signal pause of the agent's operation. When clear, the agent will pause its execution. (default: :obj:`None`)
@@ -46,6 +261,7 @@ def __init__(
max_iteration: Optional[int] = None,
agent_id: Optional[str] = None,
stop_event: Optional[threading.Event] = None,
+ tool_execution_timeout: Optional[float] = None,
mask_tool_output: bool = False,
pause_event: Optional[asyncio.Event] = None
):
@@ -499,8 +715,11 @@ to the input message.
**Returns:**
- ChatAgentResponse: Contains output messages, a termination status
-flag, and session information.
+ Union[ChatAgentResponse, StreamingChatAgentResponse]: If stream is
+False, returns a ChatAgentResponse. If stream is True, returns
+a StreamingChatAgentResponse that behaves like
+ChatAgentResponse but can also be iterated for
+streaming updates.
<a id="camel.agents.chat_agent.ChatAgent.chat_history"></a>
@@ -710,42 +929,6 @@ information.
_ModelResponse: parsed model response.
-<a id="camel.agents.chat_agent.ChatAgent._handle_stream_response"></a>
-
-### _handle_stream_response
-
-```python
-def _handle_stream_response(self, response: Stream[ChatCompletionChunk], prompt_tokens: int):
-```
-
-Process a stream response from the model and extract the necessary
-information.
-
-**Parameters:**
-
-- **response** (dict): Model response.
-- **prompt_tokens** (int): Number of input prompt tokens.
-
-**Returns:**
-
- _ModelResponse: a parsed model response.
-
-<a id="camel.agents.chat_agent.ChatAgent._handle_chunk"></a>
-
-### _handle_chunk
-
-```python
-def _handle_chunk(
- self,
- chunk: ChatCompletionChunk,
- content_dict: defaultdict,
- finish_reasons_dict: defaultdict,
- output_messages: List[BaseMessage]
-):
-```
-
-Handle a chunk of the model response.
-
<a id="camel.agents.chat_agent.ChatAgent._step_terminate"></a>
### _step_terminate
@@ -828,107 +1011,12 @@ tool calling record.
ToolCallingRecord: A struct containing information about
this tool call.
-<a id="camel.agents.chat_agent.ChatAgent.get_usage_dict"></a>
-
-### get_usage_dict
-
-```python
-def get_usage_dict(self, output_messages: List[BaseMessage], prompt_tokens: int):
-```
-
-Get usage dictionary when using the stream mode.
-
-**Parameters:**
-
-- **output_messages** (list): List of output messages.
-- **prompt_tokens** (int): Number of input prompt tokens.
-
-**Returns:**
-
- dict: Usage dictionary.
-
-<a id="camel.agents.chat_agent.ChatAgent.add_model_scheduling_strategy"></a>
-
-### add_model_scheduling_strategy
-
-```python
-def add_model_scheduling_strategy(self, name: str, strategy_fn: Callable):
-```
-
-Add a scheduling strategy method provided by user to ModelManger.
-
-**Parameters:**
-
-- **name** (str): The name of the strategy.
-- **strategy_fn** (Callable): The scheduling strategy function.
-
-<a id="camel.agents.chat_agent.ChatAgent.clone"></a>
-
-### clone
-
-```python
-def clone(self, with_memory: bool = False):
-```
-
-Creates a new instance of :obj:`ChatAgent` with the same
-configuration as the current instance.
-
-**Parameters:**
-
-- **with_memory** (bool): Whether to copy the memory (conversation history) to the new agent. If True, the new agent will have the same conversation history. If False, the new agent will have a fresh memory with only the system message. (default: :obj:`False`)
-
-**Returns:**
-
- ChatAgent: A new instance of :obj:`ChatAgent` with the same
-configuration.
-
-<a id="camel.agents.chat_agent.ChatAgent.__repr__"></a>
-
-### __repr__
-
-```python
-def __repr__(self):
-```
-
-**Returns:**
-
- str: The string representation of the :obj:`ChatAgent`.
-
-<a id="camel.agents.chat_agent.ChatAgent.to_mcp"></a>
-
-### to_mcp
-
-```python
-def to_mcp(
- self,
- name: str = 'CAMEL-ChatAgent',
- description: str = 'A helpful assistant using the CAMEL AI framework.',
- dependencies: Optional[List[str]] = None,
- host: str = 'localhost',
- port: int = 8000
-):
-```
-
-Expose this ChatAgent as an MCP server.
-
-**Parameters:**
-
-- **name** (str): Name of the MCP server. (default: :obj:`CAMEL-ChatAgent`)
-- **description** (Optional[List[str]]): Description of the agent. If None, a generic description is used. (default: :obj:`A helpful assistant using the CAMEL AI framework.`)
-- **dependencies** (Optional[List[str]]): Additional dependencies for the MCP server. (default: :obj:`None`)
-- **host** (str): Host to bind to for HTTP transport. (default: :obj:`localhost`)
-- **port** (int): Port to bind to for HTTP transport. (default: :obj:`8000`)
-
-**Returns:**
+<a id="camel.agents.chat_agent.ChatAgent._stream"></a>
- FastMCP: An MCP server instance that can be run.
-
-<a id="camel.agents.chat_agent.ChatAgent.stream"></a>
-
-### stream
+### _stream
```python
-def stream(
+def _stream(
self,
input_message: Union[BaseMessage, str],
response_format: Optional[Type[BaseModel]] = None
@@ -945,6 +1033,16 @@ intermediate responses as they are generated.
- **Yields**:
- **ChatAgentResponse**: Intermediate responses containing partial content, tool calls, and other information as they become available.
+<a id="camel.agents.chat_agent.ChatAgent._get_token_count"></a>
+
+### _get_token_count
+
+```python
+def _get_token_count(self, content: str):
+```
+
+Get token count for content with fallback.
+
<a id="camel.agents.chat_agent.ChatAgent._stream_response"></a>
### _stream_response
@@ -968,7 +1066,7 @@ Internal method to handle streaming responses with tool calls.
def _process_stream_chunks_with_accumulator(
self,
stream: Stream[ChatCompletionChunk],
- content_accumulator: '_StreamContentAccumulator',
+ content_accumulator: StreamContentAccumulator,
accumulated_tool_calls: Dict[str, Any],
tool_call_records: List[ToolCallingRecord],
step_token_usage: Dict[str, int],
@@ -1010,14 +1108,15 @@ any tool call is complete.
def _execute_tools_sync_with_status_accumulator(
self,
accumulated_tool_calls: Dict[str, Any],
- content_accumulator: '_StreamContentAccumulator',
+ content_accumulator: StreamContentAccumulator,
step_token_usage: Dict[str, int],
tool_call_records: List[ToolCallingRecord]
):
```
Execute multiple tools synchronously with
-proper content accumulation.
+proper content accumulation, using threads+queue for
+non-blocking status streaming.
<a id="camel.agents.chat_agent.ChatAgent._execute_tool_from_stream_data"></a>
@@ -1056,54 +1155,6 @@ Record the assistant message that contains tool calls.
This method creates and records an assistant message that includes
the tool calls information, which is required by OpenAI's API format.
-<a id="camel.agents.chat_agent.ChatAgent._create_tool_status_response"></a>
-
-### _create_tool_status_response
-
-```python
-def _create_tool_status_response(
- self,
- content: str,
- status_message: str,
- status_type: str,
- step_token_usage: Dict[str, int],
- tool_calls: Optional[List[ToolCallingRecord]] = None
-):
-```
-
-Create a generic tool status response to
-reduce code duplication.
-
-<a id="camel.agents.chat_agent.ChatAgent._create_simple_tool_calling_status"></a>
-
-### _create_simple_tool_calling_status
-
-```python
-def _create_simple_tool_calling_status(
- self,
- tool_call_data: Dict[str, Any],
- content: str,
- step_token_usage: Dict[str, int]
-):
-```
-
-Create a simple tool calling status response.
-
-<a id="camel.agents.chat_agent.ChatAgent._create_simple_tool_output_status"></a>
-
-### _create_simple_tool_output_status
-
-```python
-def _create_simple_tool_output_status(
- self,
- tool_call_record: ToolCallingRecord,
- content: str,
- step_token_usage: Dict[str, int]
-):
-```
-
-Create a simple tool output status response.
-
<a id="camel.agents.chat_agent.ChatAgent._create_tool_status_response_with_accumulator"></a>
### _create_tool_status_response_with_accumulator
@@ -1111,7 +1162,7 @@ Create a simple tool output status response.
```python
def _create_tool_status_response_with_accumulator(
self,
- accumulator: '_StreamContentAccumulator',
+ accumulator: StreamContentAccumulator,
status_message: str,
status_type: str,
step_token_usage: Dict[str, int],
@@ -1128,7 +1179,7 @@ Create a tool status response using content accumulator.
```python
def _create_streaming_response_with_accumulator(
self,
- accumulator: '_StreamContentAccumulator',
+ accumulator: StreamContentAccumulator,
new_content: str,
step_token_usage: Dict[str, int],
response_id: str = '',
@@ -1138,81 +1189,97 @@ def _create_streaming_response_with_accumulator(
Create a streaming response using content accumulator.
-<a id="camel.agents.chat_agent._StreamContentAccumulator"></a>
+<a id="camel.agents.chat_agent.ChatAgent.get_usage_dict"></a>
-## _StreamContentAccumulator
+### get_usage_dict
```python
-class _StreamContentAccumulator:
+def get_usage_dict(self, output_messages: List[BaseMessage], prompt_tokens: int):
```
-Manages content accumulation across streaming responses to ensure
-all responses contain complete cumulative content.
+Get usage dictionary when using the stream mode.
-<a id="camel.agents.chat_agent._StreamContentAccumulator.__init__"></a>
+**Parameters:**
-### __init__
+- **output_messages** (list): List of output messages.
+- **prompt_tokens** (int): Number of input prompt tokens.
-```python
-def __init__(self):
-```
+**Returns:**
-<a id="camel.agents.chat_agent._StreamContentAccumulator.set_base_content"></a>
+ dict: Usage dictionary.
-### set_base_content
+<a id="camel.agents.chat_agent.ChatAgent.add_model_scheduling_strategy"></a>
+
+### add_model_scheduling_strategy
```python
-def set_base_content(self, content: str):
+def add_model_scheduling_strategy(self, name: str, strategy_fn: Callable):
```
-Set the base content (usually empty or pre-tool content).
+Add a scheduling strategy method provided by user to ModelManger.
-<a id="camel.agents.chat_agent._StreamContentAccumulator.add_streaming_content"></a>
+**Parameters:**
-### add_streaming_content
+- **name** (str): The name of the strategy.
+- **strategy_fn** (Callable): The scheduling strategy function.
+
+<a id="camel.agents.chat_agent.ChatAgent.clone"></a>
+
+### clone
```python
-def add_streaming_content(self, new_content: str):
+def clone(self, with_memory: bool = False):
```
-Add new streaming content.
+Creates a new instance of :obj:`ChatAgent` with the same
+configuration as the current instance.
-<a id="camel.agents.chat_agent._StreamContentAccumulator.add_tool_status"></a>
+**Parameters:**
-### add_tool_status
+- **with_memory** (bool): Whether to copy the memory (conversation history) to the new agent. If True, the new agent will have the same conversation history. If False, the new agent will have a fresh memory with only the system message. (default: :obj:`False`)
-```python
-def add_tool_status(self, status_message: str):
-```
+**Returns:**
-Add a tool status message.
+ ChatAgent: A new instance of :obj:`ChatAgent` with the same
+configuration.
-<a id="camel.agents.chat_agent._StreamContentAccumulator.get_full_content"></a>
+<a id="camel.agents.chat_agent.ChatAgent.__repr__"></a>
-### get_full_content
+### __repr__
```python
-def get_full_content(self):
+def __repr__(self):
```
-Get the complete accumulated content.
+**Returns:**
-<a id="camel.agents.chat_agent._StreamContentAccumulator.get_content_with_new_status"></a>
+ str: The string representation of the :obj:`ChatAgent`.
-### get_content_with_new_status
+<a id="camel.agents.chat_agent.ChatAgent.to_mcp"></a>
+
+### to_mcp
```python
-def get_content_with_new_status(self, status_message: str):
+def to_mcp(
+ self,
+ name: str = 'CAMEL-ChatAgent',
+ description: str = 'A helpful assistant using the CAMEL AI framework.',
+ dependencies: Optional[List[str]] = None,
+ host: str = 'localhost',
+ port: int = 8000
+):
```
-Get content with a new status message appended.
+Expose this ChatAgent as an MCP server.
-<a id="camel.agents.chat_agent._StreamContentAccumulator.reset_streaming_content"></a>
+**Parameters:**
-### reset_streaming_content
+- **name** (str): Name of the MCP server. (default: :obj:`CAMEL-ChatAgent`)
+- **description** (Optional[List[str]]): Description of the agent. If None, a generic description is used. (default: :obj:`A helpful assistant using the CAMEL AI framework.`)
+- **dependencies** (Optional[List[str]]): Additional dependencies for the MCP server. (default: :obj:`None`)
+- **host** (str): Host to bind to for HTTP transport. (default: :obj:`localhost`)
+- **port** (int): Port to bind to for HTTP transport. (default: :obj:`8000`)
-```python
-def reset_streaming_content(self):
-```
+**Returns:**
-Reset only the streaming content, keep base and tool status.
+ FastMCP: An MCP server instance that can be run.
diff --git a/docs/reference/camel.models.azure_openai_model.md b/docs/reference/camel.models.azure_openai_model.md
index f27231d0d..e4f5a1e95 100644
--- a/docs/reference/camel.models.azure_openai_model.md
+++ b/docs/reference/camel.models.azure_openai_model.md
@@ -130,8 +130,6 @@ def _request_stream_parse(
Request streaming structured output parsing.
-Note: This uses OpenAI's beta streaming API for structured outputs.
-
<a id="camel.models.azure_openai_model.AzureOpenAIModel.check_model_config"></a>
### check_model_config
diff --git a/docs/reference/camel.models.base_model.md b/docs/reference/camel.models.base_model.md
index d6db74e5f..abf8afe60 100644
--- a/docs/reference/camel.models.base_model.md
+++ b/docs/reference/camel.models.base_model.md
@@ -161,7 +161,8 @@ Runs the query to the backend model in a non-stream mode.
Union[ChatCompletion, Stream[ChatCompletionChunk], Any]:
`ChatCompletion` in the non-stream mode, or
`Stream[ChatCompletionChunk]` in the stream mode,
-or other stream managers for structured output.
+or `ChatCompletionStreamManager[BaseModel]` in the structured
+stream mode.
<a id="camel.models.base_model.BaseModelBackend.run"></a>
@@ -189,7 +190,8 @@ Runs the query to the backend model.
Union[ChatCompletion, Stream[ChatCompletionChunk], Any]:
`ChatCompletion` in the non-stream mode,
`Stream[ChatCompletionChunk]` in the stream mode, or
-other stream managers for structured output.
+`ChatCompletionStreamManager[BaseModel]` in the structured
+stream mode.
<a id="camel.models.base_model.BaseModelBackend.check_model_config"></a>
diff --git a/docs/reference/camel.models.model_manager.md b/docs/reference/camel.models.model_manager.md
new file mode 100644
index 000000000..e6309ae57
--- /dev/null
+++ b/docs/reference/camel.models.model_manager.md
@@ -0,0 +1,211 @@
+<a id="camel.models.model_manager"></a>
+
+<a id="camel.models.model_manager.ModelProcessingError"></a>
+
+## ModelProcessingError
+
+```python
+class ModelProcessingError(Exception):
+```
+
+Raised when an error occurs during model processing.
+
+<a id="camel.models.model_manager.ModelManager"></a>
+
+## ModelManager
+
+```python
+class ModelManager:
+```
+
+ModelManager choosing a model from provided list.
+Models are picked according to defined strategy.
+
+**Parameters:**
+
+- **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`)
+
+<a id="camel.models.model_manager.ModelManager.__init__"></a>
+
+### __init__
+
+```python
+def __init__(
+ self,
+ models: Union[BaseModelBackend, List[BaseModelBackend]],
+ scheduling_strategy: str = 'round_robin'
+):
+```
+
+<a id="camel.models.model_manager.ModelManager.model_type"></a>
+
+### model_type
+
+```python
+def model_type(self):
+```
+
+**Returns:**
+
+ Union[ModelType, str]: Current model type.
+
+<a id="camel.models.model_manager.ModelManager.model_config_dict"></a>
+
+### model_config_dict
+
+```python
+def model_config_dict(self):
+```
+
+**Returns:**
+
+ Dict[str, Any]: Config dictionary of the current model.
+
+<a id="camel.models.model_manager.ModelManager.model_config_dict"></a>
+
+### model_config_dict
+
+```python
+def model_config_dict(self, model_config_dict: Dict[str, Any]):
+```
+
+Set model_config_dict to the current model.
+
+**Parameters:**
+
+- **model_config_dict** (Dict[str, Any]): Config dictionary to be set at current model.
+
+<a id="camel.models.model_manager.ModelManager.current_model_index"></a>
+
+### current_model_index
+
+```python
+def current_model_index(self):
+```
+
+**Returns:**
+
+ int: index of current model in given list of models.
+
+<a id="camel.models.model_manager.ModelManager.num_models"></a>
+
+### num_models
+
+```python
+def num_models(self):
+```
+
+**Returns:**
+
+ int: The number of models available in the model manager.
+
+<a id="camel.models.model_manager.ModelManager.token_limit"></a>
+
+### token_limit
+
+```python
+def token_limit(self):
+```
+
+**Returns:**
+
+ int: The maximum token limit for the given model.
+
+<a id="camel.models.model_manager.ModelManager.token_counter"></a>
+
+### token_counter
+
+```python
+def token_counter(self):
+```
+
+**Returns:**
+
+ BaseTokenCounter: The token counter following the model's
+tokenization style.
+
+<a id="camel.models.model_manager.ModelManager.add_strategy"></a>
+
+### add_strategy
+
+```python
+def add_strategy(self, name: str, strategy_fn: Callable):
+```
+
+Add a scheduling strategy method provided by user in case when none
+of existent strategies fits.
+When custom strategy is provided, it will be set as
+"self.scheduling_strategy" attribute.
+
+**Parameters:**
+
+- **name** (str): The name of the strategy.
+- **strategy_fn** (Callable): The scheduling strategy function.
+
+<a id="camel.models.model_manager.ModelManager.round_robin"></a>
+
+### round_robin
+
+```python
+def round_robin(self):
+```
+
+**Returns:**
+
+ BaseModelBackend for processing incoming messages.
+
+<a id="camel.models.model_manager.ModelManager.always_first"></a>
+
+### always_first
+
+```python
+def always_first(self):
+```
+
+**Returns:**
+
+ BaseModelBackend for processing incoming messages.
+
+<a id="camel.models.model_manager.ModelManager.random_model"></a>
+
+### random_model
+
+```python
+def random_model(self):
+```
+
+**Returns:**
+
+ BaseModelBackend for processing incoming messages.
+
+<a id="camel.models.model_manager.ModelManager.run"></a>
+
+### run
+
+```python
+def run(
+ self,
+ messages: List[OpenAIMessage],
+ response_format: Optional[Type[BaseModel]] = None,
+ tools: Optional[List[Dict[str, Any]]] = None
+):
+```
+
+Process a list of messages by selecting a model based on
+the scheduling strategy.
+Sends the entire list of messages to the selected model,
+and returns a single response.
+
+**Parameters:**
+
+- **messages** (List[OpenAIMessage]): Message list with the chat history in OpenAI API format.
+
+**Returns:**
+
+ Union[ChatCompletion, Stream[ChatCompletionChunk],
+ChatCompletionStreamManager[BaseModel]]:
+`ChatCompletion` in the non-stream mode, or
+`Stream[ChatCompletionChunk]` in the stream mode, or
+`ChatCompletionStreamManager[BaseModel]` for
+structured-output stream.
diff --git a/docs/reference/camel.models.openai_compatible_model.md b/docs/reference/camel.models.openai_compatible_model.md
index fe86349f6..548751f1f 100644
--- a/docs/reference/camel.models.openai_compatible_model.md
+++ b/docs/reference/camel.models.openai_compatible_model.md
@@ -107,8 +107,6 @@ def _request_stream_parse(
Request streaming structured output parsing.
-Note: This uses OpenAI's beta streaming API for structured outputs.
-
<a id="camel.models.openai_compatible_model.OpenAICompatibleModel.token_counter"></a>
### token_counter
diff --git a/docs/reference/camel.models.openai_model.md b/docs/reference/camel.models.openai_model.md
index 8a6955465..ac1961c65 100644
--- a/docs/reference/camel.models.openai_model.md
+++ b/docs/reference/camel.models.openai_model.md
@@ -151,8 +151,6 @@ def _request_stream_parse(
Request streaming structured output parsing.
-Note: This uses OpenAI's beta streaming API for structured outputs.
-
<a id="camel.models.openai_model.OpenAIModel.check_model_config"></a>
### check_model_config