fix
Browse files- controller.py +2 -2
controller.py
CHANGED
@@ -24,14 +24,14 @@ class Controller:
|
|
24 |
log_response("document \n {}".format(self.agent_config.document))
|
25 |
log_response("image \n {}".format(self.agent_config.image))
|
26 |
log_response("context \n {}".format(self.agent_config.context))
|
|
|
27 |
agent = CustomHfAgent(
|
28 |
url_endpoint=self.agent_config.url_endpoint,
|
29 |
token=os.environ['HF_token'],
|
30 |
-
additional_tools=
|
31 |
input_params={"max_new_tokens": 192},
|
32 |
)
|
33 |
|
34 |
-
selected_tools = [self.agent_config.tool_loader.tools[idx] for idx, checkbox in enumerate(self.agent_config.s_tool_checkboxe) if checkbox]
|
35 |
|
36 |
angent_respone = agent.chat(user_message,document=self.agent_config.document,image=self.agent_config.image, context = self.agent_config.context)
|
37 |
|
|
|
24 |
log_response("document \n {}".format(self.agent_config.document))
|
25 |
log_response("image \n {}".format(self.agent_config.image))
|
26 |
log_response("context \n {}".format(self.agent_config.context))
|
27 |
+
selected_tools = [self.agent_config.tool_loader.tools[idx] for idx, checkbox in enumerate(self.agent_config.s_tool_checkboxe) if checkbox]
|
28 |
agent = CustomHfAgent(
|
29 |
url_endpoint=self.agent_config.url_endpoint,
|
30 |
token=os.environ['HF_token'],
|
31 |
+
additional_tools=selected_tools,
|
32 |
input_params={"max_new_tokens": 192},
|
33 |
)
|
34 |
|
|
|
35 |
|
36 |
angent_respone = agent.chat(user_message,document=self.agent_config.document,image=self.agent_config.image, context = self.agent_config.context)
|
37 |
|