forgeant docs-test-0
Build LLM-powered agents in C++
Loading...
Searching...
No Matches
registry.hpp
Go to the documentation of this file.
1#ifndef FORGEANT_TOOL_REGISTRY_HPP
2#define FORGEANT_TOOL_REGISTRY_HPP
3
6#include <string>
7#include <unordered_map>
8#include <vector>
9
10namespace forgeant {
11
13 public:
14 void add(Tool tool);
15 [[nodiscard]] const Tool& get(const std::string& name) const;
16 [[nodiscard]] bool has(const std::string& name) const;
17 Json execute(const std::string& name, const Json& args) const;
18 [[nodiscard]] std::vector<ToolView> tools() const;
19 [[nodiscard]] size_t size() const;
20
21 private:
22 std::unordered_map<std::string, Tool> tools_;
23};
24
25} // namespace forgeant
26
27#endif // FORGEANT_TOOL_REGISTRY_HPP
Definition json.hpp:27
Definition registry.hpp:12
Json execute(const std::string &name, const Json &args) const
const Tool & get(const std::string &name) const
void add(Tool tool)
size_t size() const
std::vector< ToolView > tools() const
bool has(const std::string &name) const
Definition agent.hpp:25
Definition tool.hpp:12