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 [skip ci]

camel-docs-bot8f9ede0d232d
diff --git a/docs/mintlify/docs.json b/docs/mintlify/docs.json
index 4d125a994..e09e23ca5 100644
--- a/docs/mintlify/docs.json
+++ b/docs/mintlify/docs.json
@@ -224,6 +224,7 @@
"reference/camel.configs.anthropic_config",
"reference/camel.configs.base_config",
"reference/camel.configs.bedrock_config",
+ "reference/camel.configs.cerebras_config",
"reference/camel.configs.cohere_config",
"reference/camel.configs.cometapi_config",
"reference/camel.configs.crynux_config",
@@ -309,6 +310,7 @@
"reference/camel.models.azure_openai_model",
"reference/camel.models.base_audio_model",
"reference/camel.models.base_model",
+ "reference/camel.models.cerebras_model",
"reference/camel.models.cohere_model",
"reference/camel.models.cometapi_model",
"reference/camel.models.crynux_model",
diff --git a/docs/mintlify/reference/camel.configs.cerebras_config.mdx b/docs/mintlify/reference/camel.configs.cerebras_config.mdx
new file mode 100644
index 000000000..1da85e6a6
--- /dev/null
+++ b/docs/mintlify/reference/camel.configs.cerebras_config.mdx
@@ -0,0 +1,27 @@
+<a id="camel.configs.cerebras_config"></a>
+
+<a id="camel.configs.cerebras_config.CerebrasConfig"></a>
+
+## CerebrasConfig
+
+```python
+class CerebrasConfig(BaseConfig):
+```
+
+Defines the parameters for generating chat completions using Cerebras
+compatibility.
+
+Reference: https://inference-docs.cerebras.ai/resources/openai
+
+**Parameters:**
+
+- **temperature** (float, optional): Sampling temperature to use, between :obj:`0` and :obj:`2`. Higher values make the output more random, while lower values make it more focused and deterministic. (default: :obj:`None`)
+- **top_p** (float, optional): An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So :obj:`0.1` means only the tokens comprising the top 10% probability mass are considered. (default: :obj:`None`)
+- **response_format** (object, optional): An object specifying the format that the model must output.Setting to `{"type": "json_object"}` enables JSON mode, which guarantees the message the model generates is valid JSON. (default: :obj:`None`)
+- **stream** (bool, optional): If True, partial message deltas will be sent as data-only server-sent events as they become available. (default: :obj:`None`)
+- **stop** (str or list, optional): Up to :obj:`4` sequences where the API will stop generating further tokens. (default: :obj:`None`)
+- **max_tokens** (int, optional): The maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. (default: :obj:`None`)
+- **user** (str, optional): A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. (default: :obj:`None`)
+- **tools** (list[FunctionTool], optional): A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
+- **tool_choice** (Union[dict[str, str], str], optional): Controls which (if any) tool is called by the model. :obj:`"none"` means the model will not call any tool and instead generates a message. :obj:`"auto"` means the model can pick between generating a message or calling one or more tools. :obj:`"required"` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. :obj:`"none"` is the default when no tools are present. :obj:`"auto"` is the default if tools are present.
+- **reasoning_effort** (str, optional): A parameter specifying the level of reasoning used by certain model types. Valid values are :obj: `"low"`, :obj:`"medium"`, or :obj:`"high"`. If set, it is only applied to the model types that support it (e.g., :obj:`o1`, :obj:`o1mini`, :obj:`o1preview`, :obj:`o3mini`). If not provided or if the model type does not support it, this parameter is ignored. (default: :obj:`None`)
diff --git a/docs/mintlify/reference/camel.models.cerebras_model.mdx b/docs/mintlify/reference/camel.models.cerebras_model.mdx
new file mode 100644
index 000000000..7641bce74
--- /dev/null
+++ b/docs/mintlify/reference/camel.models.cerebras_model.mdx
@@ -0,0 +1,41 @@
+<a id="camel.models.cerebras_model"></a>
+
+<a id="camel.models.cerebras_model.CerebrasModel"></a>
+
+## CerebrasModel
+
+```python
+class CerebrasModel(OpenAICompatibleModel):
+```
+
+LLM API served by Cerebras in a unified
+OpenAICompatibleModel interface.
+
+**Parameters:**
+
+- **model_type** (Union[ModelType, str]): Model for which a backend is created.
+- **model_config_dict** (Optional[Dict[str, Any]], optional): A dictionary that will be fed into:obj:`openai.ChatCompletion.create()`.
+- **If**: obj:`None`, :obj:`CerebrasConfig().as_dict()` will be used. (default: :obj:`None`)
+- **api_key** (Optional[str], optional): The API key for authenticating with the Cerebras service. (default: :obj:`None`).
+- **url** (Optional[str], optional): The url to the Cerebras service. (default: :obj:`None`)
+- **token_counter** (Optional[BaseTokenCounter], optional): Token counter to use for the model. If not provided, :obj:`OpenAITokenCounter( ModelType.GPT_4O_MINI)` will be used. (default: :obj:`None`)
+- **timeout** (Optional[float], optional): The timeout value in seconds for API calls. If not provided, will fall back to the MODEL_TIMEOUT environment variable or default to 180 seconds. (default: :obj:`None`)
+- **max_retries** (int, optional): Maximum number of retries for API calls. (default: :obj:`3`) **kwargs (Any): Additional arguments to pass to the client initialization.
+
+<a id="camel.models.cerebras_model.CerebrasModel.__init__"></a>
+
+### __init__
+
+```python
+def __init__(
+ self,
+ model_type: Union[ModelType, str],
+ model_config_dict: Optional[Dict[str, Any]] = None,
+ api_key: Optional[str] = None,
+ url: Optional[str] = None,
+ token_counter: Optional[BaseTokenCounter] = None,
+ timeout: Optional[float] = None,
+ max_retries: int = 3,
+ **kwargs: Any
+):
+```
diff --git a/docs/mintlify/reference/camel.types.enums.mdx b/docs/mintlify/reference/camel.types.enums.mdx
index 35da593bb..7202627c9 100644
--- a/docs/mintlify/reference/camel.types.enums.mdx
+++ b/docs/mintlify/reference/camel.types.enums.mdx
@@ -139,6 +139,16 @@ def is_groq(self):
Returns whether this type of models is served by Groq.
+<a id="camel.types.enums.ModelType.is_cerebras"></a>
+
+### is_cerebras
+
+```python
+def is_cerebras(self):
+```
+
+Returns whether this type of models is served by Cerebras.
+
<a id="camel.types.enums.ModelType.is_nebius"></a>
### is_nebius
@@ -861,6 +871,16 @@ def is_minimax(self):
Returns whether this platform is Minimax M2.
+<a id="camel.types.enums.ModelPlatformType.is_cerebras"></a>
+
+### is_cerebras
+
+```python
+def is_cerebras(self):
+```
+
+Returns whether this platform is Cerebras.
+
<a id="camel.types.enums.AudioModelType"></a>
## AudioModelType