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