bstraehle commited on
Commit
a654ec1
·
verified ·
1 Parent(s): 8c6fc2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -11,28 +11,25 @@ triage_agent, sales_agent, issues_repairs_agent = None, None, None
11
  def transfer_to_triage_agent():
12
  """Call this if the user brings up a topic outside of your purview,
13
  including escalating to human."""
14
- print("transfer_to_triage_agent")
15
  set_current_agent(triage_agent)
16
 
17
  def transfer_to_sales_agent():
18
  """Use for anything sales or buying related."""
19
- print("transfer_to_sales_agent")
20
  set_current_agent(sales_agent)
21
 
22
  def transfer_to_issues_repairs_agent():
23
  """Use for issues, repairs, or refunds."""
24
- print("transfer_to_issues_repairs_agent")
25
  set_current_agent(issues_repairs_agent)
26
 
27
  #
28
 
29
  def escalate_to_human(summary):
30
  """Only call this if explicitly asked to."""
31
- print("Escalating to human agent...")
32
- print("\n=== Escalation Report ===")
33
- print(f"Summary: {summary}")
34
- print("=========================\n")
35
- exit()
36
 
37
  #
38
 
@@ -178,15 +175,15 @@ def execute_tool_call(tool_call):
178
  name = tool_call.function.name
179
  args = json.loads(tool_call.function.arguments)
180
 
181
- print(f"{name}, {args}")
182
 
183
  global tools
184
 
185
- print("===")
186
- print(tools)
187
- print("===")
188
- print(tools[name])
189
- print("===")
190
 
191
  return tools[name](**args)
192
 
 
11
  def transfer_to_triage_agent():
12
  """Call this if the user brings up a topic outside of your purview,
13
  including escalating to human."""
14
+ print("=> transfer_to_triage_agent")
15
  set_current_agent(triage_agent)
16
 
17
  def transfer_to_sales_agent():
18
  """Use for anything sales or buying related."""
19
+ print("=> transfer_to_sales_agent")
20
  set_current_agent(sales_agent)
21
 
22
  def transfer_to_issues_repairs_agent():
23
  """Use for issues, repairs, or refunds."""
24
+ print("=> transfer_to_issues_repairs_agent")
25
  set_current_agent(issues_repairs_agent)
26
 
27
  #
28
 
29
  def escalate_to_human(summary):
30
  """Only call this if explicitly asked to."""
31
+ print(f"=> escalate_to_human: summary: {summary}")
32
+ #exit()
 
 
 
33
 
34
  #
35
 
 
175
  name = tool_call.function.name
176
  args = json.loads(tool_call.function.arguments)
177
 
178
+ #print(f"{name}, {args}")
179
 
180
  global tools
181
 
182
+ #print("===")
183
+ #print(tools)
184
+ #print("===")
185
+ #print(tools[name])
186
+ #print("===")
187
 
188
  return tools[name](**args)
189