Spaces:
Running
Running
Update agents.py
Browse files
agents.py
CHANGED
@@ -10,19 +10,6 @@ from utils import function_to_schema
|
|
10 |
|
11 |
MODEL = "gpt-4o-mini"
|
12 |
|
13 |
-
escalate_to_human_json = function_to_schema(escalate_to_human)
|
14 |
-
print("###")
|
15 |
-
print(escalate_to_human_json)
|
16 |
-
print("###")
|
17 |
-
|
18 |
-
transfer_to_sales_agent_json = function_to_schema(transfer_to_sales_agent)
|
19 |
-
transfer_to_issues_repairs_agent_json = function_to_schema(transfer_to_issues_repairs_agent)
|
20 |
-
transfer_to_triage_agent_json = function_to_schema(transfer_to_triage_agent)
|
21 |
-
|
22 |
-
execute_order_json = function_to_schema(execute_order)
|
23 |
-
execute_refund_json = function_to_schema(execute_refund)
|
24 |
-
look_up_item_json = function_to_schema(look_up_item)
|
25 |
-
|
26 |
def create_triage_agent(client):
|
27 |
return client.beta.assistants.create(
|
28 |
name="Triage Agent",
|
@@ -33,9 +20,9 @@ def create_triage_agent(client):
|
|
33 |
"But make your questions subtle and natural."
|
34 |
),
|
35 |
model=MODEL,
|
36 |
-
tools=[{"type": "function", "function":
|
37 |
-
{"type": "function", "function":
|
38 |
-
{"type": "function", "function":
|
39 |
)
|
40 |
|
41 |
def create_sales_agent(client):
|
@@ -54,8 +41,8 @@ def create_sales_agent(client):
|
|
54 |
""
|
55 |
),
|
56 |
model=MODEL,
|
57 |
-
tools=[{"type": "function", "function":
|
58 |
-
{"type": "function", "function":
|
59 |
)
|
60 |
|
61 |
def create_issues_repairs_agent(client):
|
@@ -73,7 +60,7 @@ def create_issues_repairs_agent(client):
|
|
73 |
""
|
74 |
),
|
75 |
model=MODEL,
|
76 |
-
tools=[{"type": "function", "function":
|
77 |
-
{"type": "function", "function":
|
78 |
-
{"type": "function", "function":
|
79 |
)
|
|
|
10 |
|
11 |
MODEL = "gpt-4o-mini"
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
def create_triage_agent(client):
|
14 |
return client.beta.assistants.create(
|
15 |
name="Triage Agent",
|
|
|
20 |
"But make your questions subtle and natural."
|
21 |
),
|
22 |
model=MODEL,
|
23 |
+
tools=[{"type": "function", "function": function_to_schema(transfer_to_sales_agent)},
|
24 |
+
{"type": "function", "function": function_to_schema(transfer_to_issues_repairs_agent)},
|
25 |
+
{"type": "function", "function": function_to_schema(escalate_to_human)}],
|
26 |
)
|
27 |
|
28 |
def create_sales_agent(client):
|
|
|
41 |
""
|
42 |
),
|
43 |
model=MODEL,
|
44 |
+
tools=[{"type": "function", "function": function_to_schema(execute_order)},
|
45 |
+
{"type": "function", "function": function_to_schema(transfer_to_triage_agent)}],
|
46 |
)
|
47 |
|
48 |
def create_issues_repairs_agent(client):
|
|
|
60 |
""
|
61 |
),
|
62 |
model=MODEL,
|
63 |
+
tools=[{"type": "function", "function": function_to_schema(look_up_item)},
|
64 |
+
{"type": "function", "function": function_to_schema(execute_refund)},
|
65 |
+
{"type": "function", "function": function_to_schema(transfer_to_triage_agent)}],
|
66 |
)
|