public abstract class AbstractChatDialect extends Object implements ChatDialect
| Constructor and Description |
|---|
AbstractChatDialect() |
| Modifier and Type | Method and Description |
|---|---|
org.noear.snack.ONode |
buildChatMessageNode(ChatMessage chatMessage) |
protected void |
buildChatMessageNodeDo(org.noear.snack.ONode oNode,
AssistantMessage msg) |
protected void |
buildChatMessageNodeDo(org.noear.snack.ONode oNode,
SystemMessage msg) |
protected void |
buildChatMessageNodeDo(org.noear.snack.ONode oNode,
ToolMessage msg) |
protected void |
buildChatMessageNodeDo(org.noear.snack.ONode oNode,
UserMessage msg) |
protected void |
buildReqFunctionParamNodeDo(ChatFunctionParam p1,
org.noear.snack.ONode n6)
字符串形态
|
protected void |
buildReqFunctionsNode(org.noear.snack.ONode n,
ChatConfig config,
ChatOptions options,
ChatMessage lastMessage) |
protected void |
buildReqFunctionsNodeDo(org.noear.snack.ONode n,
Collection<ChatFunction> funcs) |
String |
buildRequestJson(ChatConfig config,
ChatOptions options,
List<ChatMessage> messages,
boolean isStream)
构建请求数据
|
protected List<AssistantMessage> |
parseAssistantMessage(ChatResponseDefault resp,
org.noear.snack.ONode oMessage) |
protected List<ChatFunctionCall> |
parseToolCalls(org.noear.snack.ONode toolCallsNode) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmatched, parseResponseJsonprotected void buildChatMessageNodeDo(org.noear.snack.ONode oNode,
AssistantMessage msg)
protected void buildChatMessageNodeDo(org.noear.snack.ONode oNode,
SystemMessage msg)
protected void buildChatMessageNodeDo(org.noear.snack.ONode oNode,
ToolMessage msg)
protected void buildChatMessageNodeDo(org.noear.snack.ONode oNode,
UserMessage msg)
public org.noear.snack.ONode buildChatMessageNode(ChatMessage chatMessage)
protected void buildReqFunctionsNode(org.noear.snack.ONode n,
ChatConfig config,
ChatOptions options,
ChatMessage lastMessage)
protected void buildReqFunctionsNodeDo(org.noear.snack.ONode n,
Collection<ChatFunction> funcs)
protected void buildReqFunctionParamNodeDo(ChatFunctionParam p1, org.noear.snack.ONode n6)
public String buildRequestJson(ChatConfig config, ChatOptions options, List<ChatMessage> messages, boolean isStream)
ChatDialectbuildRequestJson in interface ChatDialectconfig - 聊天配置options - 聊天选项protected List<ChatFunctionCall> parseToolCalls(org.noear.snack.ONode toolCallsNode)
protected List<AssistantMessage> parseAssistantMessage(ChatResponseDefault resp, org.noear.snack.ONode oMessage)
Copyright © 2025. All rights reserved.