File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 22#define QWEN_CLIENT_H_
33
44#include " camille-agenty/common/config.h"
5+ #include " camille-agenty/common/agenty.h"
56#include " camille-agenty/agents/agent.h"
67#include " camille-agenty/clients/client.h"
78#include " camille-agenty/agents/agent-context.h"
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ namespace agenty::common::agenty {
1010/* *
1111 * TODO:
1212 */
13- void init_agenty (); // on main startup, init here the task and parser according to agent type ptr.
13+ void init_agenty (); // on main startup, init here the context and parser according to agent type
14+ // ptr.
1415void init_llama_backend (); // on llama_client and llama server
1516void init_agent_backend (); // on cloud
1617
Original file line number Diff line number Diff line change 33namespace agenty ::client {
44
55qwen_client::qwen_client (const std::string& model_name, agent::agent_type type) {
6+ common::agenty::init_agenty ();
67 model::model model;
78 model.model_name = model_name;
9+
810 switch (type) {
911 case agent::agent_type::CLOUD_AGENT:
1012 model.model_type = model::model_type::CLOUD_MODEL_TYPE;
1113 agent_ = std::make_unique<agent::cloud_agent>();
14+ common::agenty::init_agent_backend ();
15+
1216 case agent::agent_type::LLAMA_AGENT:
1317 model.model_type = model::model_type::LLAMA_MODEL_TYPE;
1418 agent_ = std::make_unique<agent::llama_agent>();
19+ common::agenty::init_llama_backend ();
1520 }
1621 model::init_hyper_params (std::nullopt , model);
1722
Original file line number Diff line number Diff line change 1+ #include " camille-agenty/common/agenty.h"
2+ #include " camille-agenty/agents/agent-context.h"
3+ #include < memory>
4+
5+ namespace agenty ::common::agenty {
6+
7+ void init_agenty () { std::shared_ptr<agent::context> ctx = std::make_shared<agent::context>(); }
8+
9+ } // namespace agenty::common::agenty
You can’t perform that action at this time.
0 commit comments