11 lines
984 B
C++
11 lines
984 B
C++
#include "agent.h"
|
|
namespace detz::agent {
|
|
void ToolRegistry::add(ToolDef d){tools_[d.name]=d;} bool ToolRegistry::has(const std::string& n) const {return tools_.count(n)>0;}
|
|
std::vector<std::string> ToolRegistry::names() const {std::vector<std::string> o; for(auto&kv:tools_)o.push_back(kv.first); return o;}
|
|
Approval::Decision Approval::check(const std::string&) const {return Decision::Allow;}
|
|
GoalVerdict GoalVerifier::verify(const std::string& g,const std::string& o) const {return {!g.empty()&&!o.empty(),o.empty()?"empty outcome":""};}
|
|
std::vector<RetrievalScore> RetrievalEval::score(const std::string&,const std::vector<std::string>& docs) const {std::vector<RetrievalScore> o; for(auto&d:docs)o.push_back({0.0,d}); return o;}
|
|
void RagStats::record(bool h){d_.queries++; if(h)d_.hits++;} RagStatsData RagStats::data() const {return d_;}
|
|
std::string Agent::run(const std::string& g){return "agent:"+g;} ToolRegistry& Agent::registry(){return reg_;}
|
|
} // namespace detz::agent
|