Package | Description |
---|---|
cn.hutool.ai |
Hutool-ai主要用于AI大模型的封装,只需要对AI模型最基本的设置,即可调用AI大模型。
|
cn.hutool.ai.core |
AI相关基础类
|
cn.hutool.ai.model.deepseek |
对deepSeek的封装实现
|
cn.hutool.ai.model.doubao |
对doubao的封装实现
|
cn.hutool.ai.model.grok |
对grok的封装实现
|
cn.hutool.ai.model.openai |
对openai的封装实现
|
Modifier and Type | Method and Description |
---|---|
static String |
AIUtil.chat(AIConfig config,
List<Message> messages)
AI大模型对话功能
|
static String |
AIUtil.chat(AIConfig config,
String prompt)
AI大模型对话功能
|
static AIService |
AIUtil.getAIService(AIConfig config)
获取AI模型服务
|
static AIService |
AIServiceFactory.getAIService(AIConfig config)
获取AI服务
|
static <T extends AIService> |
AIUtil.getAIService(AIConfig config,
Class<T> clazz)
获取AI模型服务,每个大模型提供的功能会不一样,可以调用此方法指定不同AI服务类,调用不同的功能
|
static <T extends AIService> |
AIServiceFactory.getAIService(AIConfig config,
Class<T> clazz)
获取AI服务
|
static DeepSeekService |
AIUtil.getDeepSeekService(AIConfig config)
获取DeepSeek模型服务
|
static DoubaoService |
AIUtil.getDoubaoService(AIConfig config)
获取Doubao模型服务
|
static GrokService |
AIUtil.getGrokService(AIConfig config)
获取Grok模型服务
|
static OpenaiService |
AIUtil.getOpenAIService(AIConfig config)
获取Openai模型服务
|
Modifier and Type | Class and Description |
---|---|
class |
BaseConfig
Config基础类,定义模型配置的基本属性
|
Modifier and Type | Field and Description |
---|---|
protected AIConfig |
BaseAIService.config |
Modifier and Type | Method and Description |
---|---|
AIConfig |
AIConfigBuilder.build()
返回config实例
|
Modifier and Type | Method and Description |
---|---|
static Class<? extends AIConfig> |
AIConfigRegistry.getConfigClass(String modelName)
根据模型名称获取AIConfig实现类
|
Modifier and Type | Method and Description |
---|---|
<T extends AIService> |
AIServiceProvider.create(AIConfig config)
创建AI服务实例
|
Constructor and Description |
---|
BaseAIService(AIConfig config)
构造方法
|
Modifier and Type | Class and Description |
---|---|
class |
DeepSeekConfig
DeepSeek配置类,初始化API接口地址,设置默认的模型
|
Modifier and Type | Method and Description |
---|---|
DeepSeekService |
DeepSeekProvider.create(AIConfig config) |
Constructor and Description |
---|
DeepSeekServiceImpl(AIConfig config)
构造函数
|
Modifier and Type | Class and Description |
---|---|
class |
DoubaoConfig
Doubao配置类,初始化API接口地址,设置默认的模型
|
Modifier and Type | Method and Description |
---|---|
DoubaoService |
DoubaoProvider.create(AIConfig config) |
Constructor and Description |
---|
DoubaoServiceImpl(AIConfig config) |
Modifier and Type | Class and Description |
---|---|
class |
GrokConfig
Grok配置类,初始化API接口地址,设置默认的模型
|
Modifier and Type | Method and Description |
---|---|
GrokService |
GrokProvider.create(AIConfig config) |
Constructor and Description |
---|
GrokServiceImpl(AIConfig config) |
Modifier and Type | Class and Description |
---|---|
class |
OpenaiConfig
openai配置类,初始化API接口地址,设置默认的模型
|
Modifier and Type | Method and Description |
---|---|
OpenaiService |
OpenaiProvider.create(AIConfig config) |
Constructor and Description |
---|
OpenaiServiceImpl(AIConfig config) |
Copyright © 2025. All rights reserved.