Skip to content

Commit ace1f19

Browse files
committed
Use system message from config
1 parent 3fa8a1e commit ace1f19

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

llmstack/apps/types/agent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class AgentConfigSchema(BaseSchema):
2020
title='Model',
2121
default=AgentModel.GPT_3_5, description='The model to use for the agent.',
2222
)
23+
system_message: str = Field(
24+
title='System Message',
25+
default='You are a helpful assistant that uses provided tools to perform actions.', description='The system message to use with the Agent.',
26+
widget='textarea',
27+
)
2328
max_steps: int = Field(
2429
title='Max Steps',
2530
default=10, description='The maximum number of steps the agent can take.',

llmstack/play/actors/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, output_stream, processor_configs, dependencies=[], all_depend
4747

4848
self._agent_messages = [{
4949
'role': 'system',
50-
'content': 'You are a helpful assistant that uses provided tools to perform actions.'
50+
'content': self._config.get('system_message', 'You are a helpful assistant that uses provided tools to perform actions.')
5151
}, {
5252
'role': 'user',
5353
'content': self._input.get('task', 'Hello')

0 commit comments

Comments
 (0)