Anthropic 组件
业务组件 用于按提供商归类那些将第三方服务接入 SkillFlaw 的组件。
本页介绍 Anthropic 业务组件中的可用组件。
关于 Anthropic 组件使用的 Anthropic 功能与行为,请参阅 Anthropic documentation。
Anthropic text generation
Anthropic 组件使用 Claude 等 Anthropic Chat 与 Language 模型生成文本。
它既可以输出 Model Response(Message),也可以输出 Language Model(LanguageModel)。
具体来说,Language Model 输出是一个根据组件参数配置好的 ChatAnthropic 实例。
当你希望将 Anthropic 模型作为另一个 LLM 驱动组件(例如 Agent 或 Smart Transform 组件)的底层模型时,请使用 Language Model 输出。
更多说明请参阅语言模型组件。
Anthropic text generation 参数
有些参数在可视化编辑器中默认处于隐藏状态。 你可以通过组件标题栏菜单中的 控件 来修改全部参数。
| Name | Type | Description |
|---|---|---|
| max_tokens | Integer | 输入参数。可生成的最大 token 数。设置为 0 表示不限制。默认:4096。 |
| model | String | 输入参数。要使用的 Anthropic 模型名称,可选项包括多个 Claude 3 模型。 |
| anthropic_api_key | SecretString | 输入参数。用于认证的 Anthropic API Key。 |
| temperature | Float | 输入参数。控制输出随机性。默认:0.1。 |
| anthropic_api_url | String | 输入参数。Anthropic API 的 endpoint。若未指定,则默认使用 https://api.anthropic.com。 |
| prefill | String | 输入参数。用于引导模型响应的预填文本。 |