#include <UiChatEventHandler.hpp>
|
|
void | cancel () |
| |
|
void | reset () |
| |
|
|
void | contentChunk (const QString &chunk) |
| |
|
void | htmlChunk (const QString &html) |
| |
|
void | contentComplete (const QString &text) |
| |
|
void | reasoningChunk (const QString &reasoning) |
| |
|
void | reasoningComplete (const QString &reasoning) |
| |
|
void | toolCallRequest (const QString &callId, const QString &funcName, const QString &args) |
| |
|
void | toolCallResult (const QString &callId, const QString &funcName, const QString &output) |
| |
|
void | completed () |
| |
|
void | errorOccurred (const QString &errMsg) |
| |
流式聊天事件的 Qt 信号桥接器
同时继承 QObject 和 ChatEventHandler。 在工作线程中调用 ChatEventHandler 虚方法, 内部通过 emit 将事件转发到主线程的槽函数。 内置 MarkdownHTMLRenderer 进行流式 Markdown→HTML 转换。
◆ isCancelled()
| bool ast::UiChatEventHandler::isCancelled |
( |
| ) |
const |
|
overridevirtual |
◆ onComplete()
| void ast::UiChatEventHandler::onComplete |
( |
| ) |
|
|
overridevirtual |
◆ onContentChunk()
| void ast::UiChatEventHandler::onContentChunk |
( |
const std::string & | text | ) |
|
|
overridevirtual |
◆ onContentComplete()
| void ast::UiChatEventHandler::onContentComplete |
( |
const std::string & | text | ) |
|
|
overridevirtual |
◆ onError()
| void ast::UiChatEventHandler::onError |
( |
const std::string & | error | ) |
|
|
overridevirtual |
◆ onReasoningChunk()
| void ast::UiChatEventHandler::onReasoningChunk |
( |
const std::string & | reasoning | ) |
|
|
overridevirtual |
◆ onReasoningComplete()
| void ast::UiChatEventHandler::onReasoningComplete |
( |
const std::string & | reasoning | ) |
|
|
overridevirtual |
◆ onToolCallRequest()
| void ast::UiChatEventHandler::onToolCallRequest |
( |
const std::string & | toolCallId, |
|
|
const std::string & | functionName, |
|
|
const std::string & | arguments ) |
|
overridevirtual |
LLM 请求调用工具(含完整函数名和参数)
- 参数
-
| toolCallId | 工具调用 ID |
| functionName | 函数名称 |
| arguments | 参数字符串(JSON 格式) |
重载 ast::ChatEventHandler .
◆ onToolCallResult()
| void ast::UiChatEventHandler::onToolCallResult |
( |
const std::string & | toolCallId, |
|
|
const std::string & | functionName, |
|
|
const std::string & | result ) |
|
overridevirtual |
该类的文档由以下文件生成: