24#include "ChatAgent.hpp"
25#include "AstUtil/StringView.hpp"
54 const std::string&
prompt()
const {
return prompt_; }
60 void setExitKeywords(
const std::vector<std::string>& keywords) { exitKeywords_ = keywords; }
67 const std::vector<std::string>&
exitKeywords()
const {
return exitKeywords_; }
71 std::vector<std::string> exitKeywords_;
聊天智能体抽象基类
定义 ChatAgent.hpp:40
virtual errc_t run(ChatMessages &messages)=0
执行智能体逻辑
virtual errc_t runStream(ChatMessages &messages, ChatEventHandler &handler)=0
执行智能体逻辑(流式)
流式聊天事件处理器
定义 ChatEventHandler.hpp:42
聊天消息集合
定义 ChatMessages.hpp:39
用户代理智能体
定义 UserProxyAgent.hpp:41
void addExitKeyword(StringView keyword)
添加一个退出关键词
定义 UserProxyAgent.hpp:64
void setExitKeywords(const std::vector< std::string > &keywords)
设置退出关键词列表(完全替换现有列表)
定义 UserProxyAgent.hpp:60
const std::string & prompt() const
获取输入提示词
定义 UserProxyAgent.hpp:54
void setPrompt(StringView prompt)
设置输入提示词
定义 UserProxyAgent.hpp:51
const std::vector< std::string > & exitKeywords() const
获取退出关键词列表
定义 UserProxyAgent.hpp:67