Spaces:
Paused
Paused
fix: Clone a new agent per session to isolate the session conversation from others
Browse files- Gradio_UI.py +5 -4
Gradio_UI.py
CHANGED
@@ -24,6 +24,7 @@ from smolagents.agent_types import AgentAudio, AgentImage, AgentText, handle_age
|
|
24 |
from smolagents.agents import ActionStep, MultiStepAgent
|
25 |
from smolagents.memory import MemoryStep
|
26 |
from smolagents.utils import _is_package_available
|
|
|
27 |
|
28 |
import gradio as gr
|
29 |
|
@@ -195,10 +196,10 @@ class AgentCloner:
|
|
195 |
tools=self.agent.tools,
|
196 |
max_steps=self.agent.max_steps,
|
197 |
verbosity_level=self.agent.verbosity_level,
|
198 |
-
grammar=self.agent
|
199 |
-
planning_interval=self.agent
|
200 |
-
name=self.agent
|
201 |
-
description=self.agent
|
202 |
prompt_templates=self.agent.prompt_templates
|
203 |
)
|
204 |
return new_agent
|
|
|
24 |
from smolagents.agents import ActionStep, MultiStepAgent
|
25 |
from smolagents.memory import MemoryStep
|
26 |
from smolagents.utils import _is_package_available
|
27 |
+
from smolagents import CodeAgent, HfApiModel
|
28 |
|
29 |
import gradio as gr
|
30 |
|
|
|
196 |
tools=self.agent.tools,
|
197 |
max_steps=self.agent.max_steps,
|
198 |
verbosity_level=self.agent.verbosity_level,
|
199 |
+
grammar=self.agent.grammar,
|
200 |
+
planning_interval=self.agent.planning_interval,
|
201 |
+
name=self.agent.name,
|
202 |
+
description=self.agent.description,
|
203 |
prompt_templates=self.agent.prompt_templates
|
204 |
)
|
205 |
return new_agent
|