类 AnthropicChatModel.Builder
java.lang.Object
io.agentscope.core.model.AnthropicChatModel.Builder
- 封闭类:
AnthropicChatModel
Builder for AnthropicChatModel.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Sets the API key for authentication.Sets the base URL for the Anthropic API.build()Builds the AnthropicChatModel instance.defaultOptions(GenerateOptions defaultOptions) Sets default generation options.formatter(AnthropicBaseFormatter formatter) Sets a custom formatter.Sets the model name.stream(boolean streamEnabled) Enables or disables streaming.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
baseUrl
Sets the base URL for the Anthropic API.- 参数:
baseUrl- the base URL- 返回:
- this builder
-
apiKey
Sets the API key for authentication.- 参数:
apiKey- the API key- 返回:
- this builder
-
modelName
Sets the model name.- 参数:
modelName- the model name- 返回:
- this builder
-
stream
Enables or disables streaming.- 参数:
streamEnabled- true to enable streaming- 返回:
- this builder
-
defaultOptions
Sets default generation options.- 参数:
defaultOptions- the default options- 返回:
- this builder
-
formatter
Sets a custom formatter.- 参数:
formatter- the formatter- 返回:
- this builder
-
build
Builds the AnthropicChatModel instance.- 返回:
- a new AnthropicChatModel
-