Kai Jennissen commited on
Commit
1c0a810
·
unverified ·
1 Parent(s): 63a7c32
Files changed (1) hide show
  1. agent.py +19 -2
agent.py CHANGED
@@ -13,6 +13,15 @@ load_dotenv()
13
  # Initialize tracing when module is imported
14
  trace_provider = None
15
 
 
 
 
 
 
 
 
 
 
16
 
17
  def initialize_tracing(enabled=True, provider="langfuse"):
18
  """
@@ -40,7 +49,12 @@ def get_agent():
40
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct", provider="together"
41
  )
42
  llm_deepseek = InferenceClientModel(
43
- "deepseek-ai/DeepSeek-R1", provider="together", max_tokens=8096
 
 
 
 
 
44
  )
45
 
46
  # Create web agent
@@ -50,6 +64,7 @@ def get_agent():
50
  max_steps=3,
51
  name="Web_Agent",
52
  description="A web agent that can search the web and visit webpages.",
 
53
  )
54
 
55
  # Create manager agent
@@ -57,9 +72,11 @@ def get_agent():
57
  tools=[],
58
  managed_agents=[web_agent],
59
  model=llm_deepseek,
60
- max_steps=3,
61
  planning_interval=10,
62
  additional_authorized_imports=["pandas", "numpy"],
 
 
63
  )
64
  return manager_agent
65
 
 
13
  # Initialize tracing when module is imported
14
  trace_provider = None
15
 
16
+ MANAGER_PROMPT = """You are a helpful assistant tasked with answering questions using a set of tools.
17
+ Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
18
+ FINAL ANSWER: [YOUR FINAL ANSWER].
19
+ YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
20
+ If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
21
+ If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
22
+ If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
23
+ Your answer should only start with "FINAL ANSWER: ", then follows with the answer. """
24
+
25
 
26
  def initialize_tracing(enabled=True, provider="langfuse"):
27
  """
 
49
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct", provider="together"
50
  )
51
  llm_deepseek = InferenceClientModel(
52
+ "deepseek-ai/DeepSeek-R1",
53
+ provider="together",
54
+ max_tokens=8096,
55
+ # "Qwen/Qwen3-235B-A22B-FP8",
56
+ # provider="together",
57
+ # max_tokens=8096,
58
  )
59
 
60
  # Create web agent
 
64
  max_steps=3,
65
  name="Web_Agent",
66
  description="A web agent that can search the web and visit webpages.",
67
+ verbosity_level=1,
68
  )
69
 
70
  # Create manager agent
 
72
  tools=[],
73
  managed_agents=[web_agent],
74
  model=llm_deepseek,
75
+ max_steps=5,
76
  planning_interval=10,
77
  additional_authorized_imports=["pandas", "numpy"],
78
+ verbosity_level=1,
79
+ description=MANAGER_PROMPT,
80
  )
81
  return manager_agent
82