yetessam commited on
Commit
37465d6
·
verified ·
1 Parent(s): 311107f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -30,17 +30,20 @@ def initialize_agent(endpoint_uri: str):
30
  model_id=endpoint_uri,
31
  custom_role_conversions=None,
32
  )
33
-
34
- return CodeAgent(
35
  model=model,
36
  tools=combined_tools,
37
  max_steps=6,
38
  verbosity_level=3,
39
  name="content_agent",
40
  description="Evaluates whether text is polite or impolite.",
41
- prompt_templates=custom_prompts, # override prompts
42
  additional_authorized_imports=["pytz"]
43
  )
 
 
 
44
 
45
  def main():
46
  uri = resolve_endpoint()
 
30
  model_id=endpoint_uri,
31
  custom_role_conversions=None,
32
  )
33
+
34
+ agent = CodeAgent(
35
  model=model,
36
  tools=combined_tools,
37
  max_steps=6,
38
  verbosity_level=3,
39
  name="content_agent",
40
  description="Evaluates whether text is polite or impolite.",
41
+ #prompt_templates=custom_prompts, # override prompts
42
  additional_authorized_imports=["pytz"]
43
  )
44
+ agent.prompt_templates["system_prompt"] = agent.prompt_templates["system_prompt"] + "\n" + custom_prompts
45
+ return agent
46
+
47
 
48
  def main():
49
  uri = resolve_endpoint()