-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
36 lines (27 loc) · 840 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Given Below is an example of how to use the RouteAgent class to route prompts to different agents based on the
context of the prompt.
"""
'''
from routeagent import Router
def maths_tutor(prompt: str):
return f"""
Activated the Maths Tutor
The Prompt was {prompt}
"""
def science_tutor(prompt: str):
return f"""
Activated the Science Tutor
The Prompt was {prompt}
"""
controller = Router(
model="gpt-4o",
agent_1=maths_tutor,
description_1="The agent is specifically designed to answer maths questions and excels in doing so",
agent_2=science_tutor,
description_2="The agent is specifically designed to answer science ( Biology, Chemistry, Physics)"
" questions and excels in doing so"
)
response = controller("What is meant by dy/dx?")
print(response)
'''