| Modifier and Type | Method and Description |
|---|---|
AgentSession |
AbstractAgent.run(List<ConversationMessage> messages) |
| Modifier and Type | Method and Description |
|---|---|
static AgentSession |
AgentSessionHelper.initAgentSession(List<ConversationMessage> messages)
使用一组消息初始化一个AgentSession
|
AgentSession |
Agent.run(List<ConversationMessage> messages)
递归执行Agent,直到完成所有步骤的执行
|
| Modifier and Type | Method and Description |
|---|---|
<RESP extends LLMResp> |
LLM.ask(List<ConversationMessage> chatMessages)
多轮问答
|
<RESP extends LLMResp> |
LLM.ask(List<ConversationMessage> chatMessages,
LLMParamConfig paramConfig)
多轮问答
|
| Modifier and Type | Method and Description |
|---|---|
List<ConversationMessage> |
MessageHistory.getMessages()
获取历史信息
|
| Modifier and Type | Method and Description |
|---|---|
void |
MessageHistory.addMessage(ConversationMessage message)
添加信息
|
| Modifier and Type | Method and Description |
|---|---|
Function<List<ConversationMessage>,String> |
ToolRetriever.getQueryPreprocessor()
获取query请求的预处理器
|
| Modifier and Type | Method and Description |
|---|---|
void |
ToolRetriever.setQueryPreprocessor(Function<List<ConversationMessage>,String> preprocessor)
设置query请求的预处理器,
当ToolRetriever被设置在Agent中时,Agent在Retrieve工具前,先会调用query预处理器对多轮对话进行改写,
如果不设置,默认使用多轮中的最后一轮对话
|
| Modifier and Type | Method and Description |
|---|---|
static ConversationMessage |
MessagePo.parseObject(String message)
反序列化对象
|
| Modifier and Type | Method and Description |
|---|---|
static List<ConversationMessage> |
MessagePo.parseArray(String message)
反序列化List
|
| Modifier and Type | Method and Description |
|---|---|
static String |
MessagePo.toString(ConversationMessage message)
序列化
|
| Modifier and Type | Method and Description |
|---|---|
static String |
MessagePo.toBuffer(List<ConversationMessage> messages)
消息转对话文本;
|
static String |
MessagePo.toString(List<ConversationMessage> messages)
序列化List
|
| Modifier and Type | Method and Description |
|---|---|
<RESP extends LLMResp> |
AbstractLLM.ask(List<ConversationMessage> chatMessages) |
<RESP extends LLMResp> |
AbstractLLM.ask(List<ConversationMessage> chatMessages,
LLMParamConfig paramConfig) |
protected LLMRespOpenAI |
OpenAI.getLLMResponse(List<ConversationMessage> chatMessages,
LLMParamConfig paramConfig) |
protected abstract RESP |
AbstractLLM.getLLMResponse(List<ConversationMessage> chatMessages,
LLMParamConfig llmParamConfig)
调用chat接口
|
protected LLMRespGallery |
Gallery.getLLMResponse(List<ConversationMessage> chatMessages,
LLMParamConfig llmParamConfig) |
protected LLMRespPangu |
Pangu.getLLMResponse(List<ConversationMessage> chatMessages,
LLMParamConfig llmParamConfig) |
| Modifier and Type | Method and Description |
|---|---|
List<ConversationMessage> |
ChatMessageHistory.getMessages()
查询message列表
|
List<ConversationMessage> |
SqlChatMessageHistory.getMessages() |
List<ConversationMessage> |
RedisChatMessageHistory.getMessages()
查询message列表
|
| Modifier and Type | Method and Description |
|---|---|
void |
ChatMessageHistory.addMessage(ConversationMessage message)
添加消息
|
void |
SqlChatMessageHistory.addMessage(ConversationMessage message) |
void |
RedisChatMessageHistory.addMessage(ConversationMessage message)
添加消息
|
protected boolean |
AbstractMessageHistory.validateMessage(ConversationMessage message)
增加最大长度校验,超过长度不存储
|
| Modifier and Type | Method and Description |
|---|---|
Function<List<ConversationMessage>,String> |
AbstractToolRetriever.getQueryPreprocessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractToolRetriever.setQueryPreprocessor(Function<List<ConversationMessage>,String> preprocessor) |
| Modifier and Type | Method and Description |
|---|---|
String |
ConversationRewriteSkill.rewrite(List<ConversationMessage> messages) |
Copyright © 2024. All rights reserved.