Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,13 +38,10 @@ def initialize_agent(endpoint_uri: str):
|
|
| 38 |
verbosity_level=3,
|
| 39 |
name="content_agent",
|
| 40 |
description="Evaluates whether text is polite or impolite.",
|
| 41 |
-
|
| 42 |
additional_authorized_imports=["pytz"]
|
| 43 |
)
|
| 44 |
|
| 45 |
-
# add our custom prompts after the basic prompts
|
| 46 |
-
test = agent.prompt_templates["system_prompt"]
|
| 47 |
-
agent.prompt_templates = test + "\n" + custom_prompts
|
| 48 |
|
| 49 |
return agent
|
| 50 |
|
|
|
|
| 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 |
|
| 46 |
return agent
|
| 47 |
|