documentation
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ model = HfApiModel(
|
|
| 43 |
max_tokens=2096,
|
| 44 |
temperature=0.5,
|
| 45 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 46 |
-
custom_role_conversions=None,
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
@@ -51,18 +51,18 @@ custom_role_conversions=None,
|
|
| 51 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 52 |
|
| 53 |
with open("prompts.yaml", 'r') as stream:
|
| 54 |
-
prompt_templates = yaml.safe_load(stream)
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 59 |
-
max_steps=6,
|
| 60 |
-
verbosity_level=1,
|
| 61 |
-
grammar=None,
|
| 62 |
-
planning_interval=None,
|
| 63 |
-
name=None
|
| 64 |
-
description=None,
|
| 65 |
-
prompt_templates=prompt_templates
|
| 66 |
)
|
| 67 |
|
| 68 |
|
|
|
|
| 43 |
max_tokens=2096,
|
| 44 |
temperature=0.5,
|
| 45 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 46 |
+
custom_role_conversions=None, # default role-mapping
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
| 51 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 52 |
|
| 53 |
with open("prompts.yaml", 'r') as stream:
|
| 54 |
+
prompt_templates = yaml.safe_load(stream) # parse sys prompt into python dic
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 59 |
+
max_steps=6, # number of reasoning + action steps allowed
|
| 60 |
+
verbosity_level=1, # internal reasoning exposed
|
| 61 |
+
grammar=None, # optional output schema constraint
|
| 62 |
+
planning_interval=None, # no replan
|
| 63 |
+
name=None,# human-readable agent name
|
| 64 |
+
description=None, # description of agent's role
|
| 65 |
+
prompt_templates=prompt_templates # system prompt
|
| 66 |
)
|
| 67 |
|
| 68 |
|