agentscope.models.anthropic_model module

The Anthropic model wrapper for AgentScope.

class AnthropicChatWrapper(model_name: str, config_name: str | None = None, api_key: str | None = None, stream: bool = False, client_kwargs: dict | None = None)[源代码]

基类:ModelWrapperBase

The Anthropic model wrapper for AgentScope.

format(*args: Msg | Sequence[Msg]) list[dict[str, object]][源代码]

Format the messages for anthropic model input.

TODO: Add support for multimodal input.

参数:

*args (Union[Msg, list[Msg]]) – The message(s) to be formatted.

返回:

A list of formatted messages.

返回类型:

list[dict[str, object]]

config_name: str

The name of the model configuration.

model_name: str

The name of the model, which is used in model api calling.

model_type: str = 'anthropic_chat'

The type of the model wrapper, which is to identify the model wrapper class in model configuration.