AnthropicChatModelBuilderCustomizer
@FunctionalInterface public interface AnthropicChatModelBuilderCustomizer extends Consumer<AnthropicChatModel.Builder>
源码Source
io/agentscope/spring/boot/anthropic/AnthropicChatModelBuilderCustomizer.java:33–52定义 Anthropic 聊天模型构建器 Customizer契约的接口。位于 io.agentscope.spring.boot.anthropic 包,实现 Consumer<AnthropicChatModel.Builder>。核心成员包括 customize、accept。
Customizer for AnthropicChatModel.Builder.
Example usage:
` @Bean
public AnthropicChatModelBuilderCustomizer anthropicChatModelBuilderCustomizer() {
return builder -> builder.baseUrl("https://custom.example.com/v1");
}
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void customize(AnthropicChatModel.Builder builder) | 设置该参数。 Customize the `AnthropicChatModel.Builder`. |
default public void accept(AnthropicChatModel.Builder builder)default | 设置该参数。 Accept and invoke the given builder. |
方法详情Method Detail
customize
public void customize(AnthropicChatModel.Builder builder)
设置该参数。
Customize the AnthropicChatModel.Builder.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
builder | AnthropicChatModel.Builder | 构建器(类型 `AnthropicChatModel.Builder`)。the builder to customize |
源码Source
io/agentscope/spring/boot/anthropic/AnthropicChatModelBuilderCustomizer.java:41accept
default public void accept(AnthropicChatModel.Builder builder)
default
设置该参数。
Accept and invoke the given builder.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
builder | AnthropicChatModel.Builder | 构建器(类型 `AnthropicChatModel.Builder`)。the builder to customize |
源码Source
io/agentscope/spring/boot/anthropic/AnthropicChatModelBuilderCustomizer.java:48–51