kevinhug commited on
Commit
f2c5257
·
1 Parent(s): 3e8163f

multi agent

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. multi.py +8 -6
app.py CHANGED
@@ -144,8 +144,8 @@ With the right competitive research, you don’t just react to the market—you
144
 
145
  gr.Examples(
146
  [
147
- [
148
- "Docker Containers", "REST API", "Python"]
149
  ],
150
  [in_verbatim]
151
  )
 
144
 
145
  gr.Examples(
146
  [
147
+
148
+ "Docker Containers", "REST API", "Python"
149
  ],
150
  [in_verbatim]
151
  )
multi.py CHANGED
@@ -5,20 +5,22 @@ from agno.tools.duckduckgo import DuckDuckGoTools
5
  from agno.models.ollama import Ollama
6
  from agno.models.groq import Groq
7
  import os
8
- chat=Groq(id='llama-3.1-8b-instant') if os.getenv("GROQ_API_KEY") else Ollama(id="llama3.2" )
 
9
  # Create individual specialized agents
10
  researcher = Agent(
11
  name="Researcher",
12
- role="Expert at finding information by breaking the structure into components",
13
- tools=[DuckDuckGoTools()],
14
  show_tool_calls=True,
 
15
  model=chat, #OpenAIChat("gpt-4o"),
16
  #debug_mode=True,
17
  )
18
 
19
  engineer = Agent(
20
  name="Security Engineer",
21
- role="Security Expert at writing clear, engaging content for hands-on best practices, and common pitfalls with solution",
22
  model=chat, #OpenAIChat("gpt-4o"),
23
  )
24
 
@@ -33,14 +35,14 @@ content_team = Team(
33
  )
34
  def bestPractice(topic):
35
  r = content_team.run(topic)
36
- return r.messages[-1].content
37
 
38
  if __name__=='__main__':
39
  from pprint import pprint
40
  from agno.utils.pprint import pprint_run_response
41
  r=content_team.run("Docker Containers")
42
  pprint_run_response(r, markdown=True)
43
- print([m.content for m in r.messages if m.role == 'assistant'][-1])
44
 
45
 
46
  print("")
 
5
  from agno.models.ollama import Ollama
6
  from agno.models.groq import Groq
7
  import os
8
+ #chat=Groq(id='llama-3.3-70b-versatile') if os.getenv("GROQ_API_KEY") else
9
+ chat=Ollama(id="qwen2.5")
10
  # Create individual specialized agents
11
  researcher = Agent(
12
  name="Researcher",
13
+ role="Expert at finding information by breaking the structure into components ie) architecture, code, algorithm, linux system",
14
+ tools=[DuckDuckGoTools(fixed_max_results=3)],
15
  show_tool_calls=True,
16
+ tool_call_limit=1,
17
  model=chat, #OpenAIChat("gpt-4o"),
18
  #debug_mode=True,
19
  )
20
 
21
  engineer = Agent(
22
  name="Security Engineer",
23
+ role="Security Expert at writing short, clear, engaging content for hands-on best practices, and common pitfalls with solution",
24
  model=chat, #OpenAIChat("gpt-4o"),
25
  )
26
 
 
35
  )
36
  def bestPractice(topic):
37
  r = content_team.run(topic)
38
+ return [m for m in r.messages if m.role == 'assistant'][-1].content
39
 
40
  if __name__=='__main__':
41
  from pprint import pprint
42
  from agno.utils.pprint import pprint_run_response
43
  r=content_team.run("Docker Containers")
44
  pprint_run_response(r, markdown=True)
45
+ print([m for m in r.messages if m.role == 'assistant'][-1].content)
46
 
47
 
48
  print("")