🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
Auto-update documentation after merge [skip ci]
camel-docs-botbdb4f646dd2b
diff --git a/docs/mintlify/reference/camel.configs.anthropic_config.mdx b/docs/mintlify/reference/camel.configs.anthropic_config.mdxindex 9e78b04f6..c4712fab3 100644--- a/docs/mintlify/reference/camel.configs.anthropic_config.mdx+++ b/docs/mintlify/reference/camel.configs.anthropic_config.mdx@@ -24,7 +24,7 @@ See: https://docs.anthropic.com/en/api/messages- **metadata** (dict, optional): An object describing metadata about the request. Can include user_id as an external identifier for the user associated with the request. (default: :obj:`None`)- **tool_choice** (dict, optional): How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. (default: :obj:`None`)- **cache_control** (`Optional[Literal["5m", "1h"]], optional`): The cache control TTL for prompt caching. Use '5m' for 5-minute cache or '1h' for 1-hour cache. (default: :obj:`None`)-- **thinking** (dict, optional): Extended thinking configuration for Claude models, such as :obj:`{"type": "enabled", "budget_tokens": 1024}`, :obj:`{"type": "enabled", "budget_tokens": 1024, "display": "omitted"}`, or :obj:`{"type": "adaptive"}`. (default: :obj:`None`)+- **thinking** (dict, optional): Extended thinking configuration for Claude models, such as :obj:`{"type": "enabled", "budget_tokens": 1024}` or :obj:`{"type": "adaptive"}`. (default: :obj:`None`)- **output_config** (dict, optional): Anthropic output configuration. This can be used with adaptive thinking to set effort, or with structured outputs. (default: :obj:`None`)- **extra_headers** (Optional[dict], optional): Additional headers for the request. (default: :obj:`None`)- **extra_body** (dict, optional): Extra body parameters to be passed to the Anthropic API.diff --git a/docs/mintlify/reference/camel.models.anthropic_model.mdx b/docs/mintlify/reference/camel.models.anthropic_model.mdxindex a65c70432..38d771a57 100644--- a/docs/mintlify/reference/camel.models.anthropic_model.mdx+++ b/docs/mintlify/reference/camel.models.anthropic_model.mdx@@ -86,6 +86,124 @@ def supports_tool_response_format(self):Anthropic JSON outputs are independent from strict tool use.+<a id="camel.models.anthropic_model.AnthropicModel._get_block_value"></a>++### _get_block_value++```python+def _get_block_value(block: Any, key: str, default: Any = None):+```++Read a content block value from a dict or SDK object.++<a id="camel.models.anthropic_model.AnthropicModel._content_block_to_dict"></a>++### _content_block_to_dict++```python+def _content_block_to_dict(cls, block: Any):+```++Convert an Anthropic content block to a plain dictionary.++<a id="camel.models.anthropic_model.AnthropicModel._extract_thinking_blocks_from_message"></a>++### _extract_thinking_blocks_from_message++```python+def _extract_thinking_blocks_from_message(cls, message: OpenAIMessage):+```++Extract raw Anthropic thinking blocks from an OpenAI message.++<a id="camel.models.anthropic_model.AnthropicModel._get_tool_call_id"></a>++### _get_tool_call_id++```python+def _get_tool_call_id(tool_call: Any):+```++Extract an OpenAI-style tool call ID from a dict or SDK object.++<a id="camel.models.anthropic_model.AnthropicModel._get_tool_call_extra_content"></a>++### _get_tool_call_extra_content++```python+def _get_tool_call_extra_content(cls, tool_call: Any):+```++Extract non-standard extra content from a tool call.++<a id="camel.models.anthropic_model.AnthropicModel._extract_thinking_blocks_from_tool_call"></a>++### _extract_thinking_blocks_from_tool_call++```python+def _extract_thinking_blocks_from_tool_call(cls, tool_call: Any):+```++Extract raw Anthropic thinking blocks from tool extra content.++<a id="camel.models.anthropic_model.AnthropicModel._get_cached_thinking_blocks_for_tool_calls"></a>++### _get_cached_thinking_blocks_for_tool_calls++```python+def _get_cached_thinking_blocks_for_tool_calls(self, tool_calls: List[Any]):+```++Return cached thinking blocks for the first matching tool call.++<a id="camel.models.anthropic_model.AnthropicModel._cache_thinking_blocks_for_tool_calls"></a>++### _cache_thinking_blocks_for_tool_calls++```python+def _cache_thinking_blocks_for_tool_calls(+ self,+ thinking_blocks: List[Dict[str, Any]],+ tool_calls: List[Any]+):+```++Cache raw thinking blocks for Anthropic tool-use continuation.++<a id="camel.models.anthropic_model.AnthropicModel._is_thinking_enabled"></a>++### _is_thinking_enabled++```python+def _is_thinking_enabled(thinking: Any):+```++Return whether an Anthropic thinking config enables thinking.++<a id="camel.models.anthropic_model.AnthropicModel._validate_tool_choice_for_thinking"></a>++### _validate_tool_choice_for_thinking++```python+def _validate_tool_choice_for_thinking(self, thinking: Any, tool_choice: Any):+```++Validate Anthropic's tool-choice limitation for thinking.++<a id="camel.models.anthropic_model.AnthropicModel._build_request_output_config"></a>++### _build_request_output_config++```python+def _build_request_output_config(+ self,+ response_format: Optional[Type[BaseModel]],+ extra_body: Dict[str, Any]+):+```++Build Anthropic output_config from config and response_format.+<a id="camel.models.anthropic_model.AnthropicModel._convert_openai_to_anthropic_messages"></a>### _convert_openai_to_anthropic_messages@@ -165,7 +283,8 @@ def _convert_anthropic_stream_to_openai_chunk(chunk: Any,model: str,tool_call_index: Dict[str, int],- finish_reason_sent: bool = False+ finish_reason_sent: bool = False,+ thinking_state: Optional[Dict[str, Any]] = None):```diff --git a/docs/reference/camel.configs.anthropic_config.md b/docs/reference/camel.configs.anthropic_config.mdnew file mode 100644index 000000000..9e78b04f6--- /dev/null+++ b/docs/reference/camel.configs.anthropic_config.md@@ -0,0 +1,30 @@+<a id="camel.configs.anthropic_config"></a>++<a id="camel.configs.anthropic_config.AnthropicConfig"></a>++## AnthropicConfig++```python+class AnthropicConfig(BaseConfig):+```++Defines the parameters for generating chat completions using the+Anthropic API.++See: https://docs.anthropic.com/en/api/messages++**Parameters:**++- **max_tokens** (int, optional): The maximum number of tokens to generate before stopping. Note that Anthropic models may stop before reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. (default: :obj:`None`)+- **stop_sequences** (List[str], optional): Custom text sequences that will cause the model to stop generating. The models will normally stop when they have naturally completed their turn. If the model encounters one of these custom sequences, the response will be terminated and the stop_reason will be "stop_sequence". (default: :obj:`None`)+- **temperature** (float, optional): Amount of randomness injected into the response. Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks. Note that even with temperature of 0.0, the results will not be fully deterministic. (default: :obj:`None`)+- **top_p** (float, optional): Use nucleus sampling. In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. You should either alter `temperature` or `top_p`, but not both. (default: :obj:`None`)+- **top_k** (int, optional): Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. (default: :obj:`None`)+- **stream** (bool, optional): Whether to incrementally stream the response using server-sent events. (default: :obj:`None`)+- **metadata** (dict, optional): An object describing metadata about the request. Can include user_id as an external identifier for the user associated with the request. (default: :obj:`None`)+- **tool_choice** (dict, optional): How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. (default: :obj:`None`)+- **cache_control** (`Optional[Literal["5m", "1h"]], optional`): The cache control TTL for prompt caching. Use '5m' for 5-minute cache or '1h' for 1-hour cache. (default: :obj:`None`)+- **thinking** (dict, optional): Extended thinking configuration for Claude models, such as :obj:`{"type": "enabled", "budget_tokens": 1024}`, :obj:`{"type": "enabled", "budget_tokens": 1024, "display": "omitted"}`, or :obj:`{"type": "adaptive"}`. (default: :obj:`None`)+- **output_config** (dict, optional): Anthropic output configuration. This can be used with adaptive thinking to set effort, or with structured outputs. (default: :obj:`None`)+- **extra_headers** (Optional[dict], optional): Additional headers for the request. (default: :obj:`None`)+- **extra_body** (dict, optional): Extra body parameters to be passed to the Anthropic API.