public class DashscopeChatDialect extends AbstractChatDialect
| Constructor and Description |
|---|
DashscopeChatDialect() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildChatMessageNodeDo(org.noear.snack.ONode oNode,
UserMessage msg) |
String |
buildRequestJson(ChatConfig config,
ChatOptions options,
List<ChatMessage> messages,
boolean isStream)
构建请求数据
|
static DashscopeChatDialect |
getInstance() |
boolean |
matched(ChatConfig config)
匹配检测
|
List<AssistantMessage> |
parseAssistantMessage(ChatResponseDefault resp,
org.noear.snack.ONode oMessage)
分析工具调用
|
boolean |
parseResponseJson(ChatConfig config,
ChatResponseDefault resp,
String json)
分析响应数据
|
buildAssistantMessageNode, buildChatMessageNode, buildChatMessageNodeDo, buildChatMessageNodeDo, buildChatMessageNodeDo, buildReqToolsNode, buildReqToolsNodeDo, parseToolCall, parseToolCallspublic static DashscopeChatDialect getInstance()
public boolean matched(ChatConfig config)
config - 聊天配置public String buildRequestJson(ChatConfig config, ChatOptions options, List<ChatMessage> messages, boolean isStream)
ChatDialectbuildRequestJson in interface ChatDialectbuildRequestJson in class AbstractChatDialectconfig - 聊天配置options - 聊天选项public boolean parseResponseJson(ChatConfig config, ChatResponseDefault resp, String json)
ChatDialectconfig - 聊天配置public List<AssistantMessage> parseAssistantMessage(ChatResponseDefault resp, org.noear.snack.ONode oMessage)
ChatDialectparseAssistantMessage in interface ChatDialectparseAssistantMessage in class AbstractChatDialectprotected void buildChatMessageNodeDo(org.noear.snack.ONode oNode,
UserMessage msg)
buildChatMessageNodeDo in class AbstractChatDialectCopyright © 2025. All rights reserved.