|
33 | 33 | ) |
34 | 34 | from askui.chat.api.settings import Settings |
35 | 35 | from askui.custom_agent import CustomAgent |
36 | | -from askui.models.shared.prompts import ActSystemPrompt |
37 | 36 | from askui.models.shared.agent_message_param import MessageParam |
38 | 37 | from askui.models.shared.agent_on_message_cb import OnMessageCbParam |
| 38 | +from askui.models.shared.prompts import ActSystemPrompt |
39 | 39 | from askui.models.shared.settings import ActSettings, MessageSettings |
40 | 40 | from askui.models.shared.tools import ToolCollection |
41 | 41 | from askui.prompts.act_prompts import caesr_system_prompt |
@@ -96,17 +96,17 @@ def _modify_run(self, params: RunModify) -> Run: |
96 | 96 | ) |
97 | 97 |
|
98 | 98 | def _build_system(self) -> ActSystemPrompt: |
99 | | - metadata = json.dumps({ |
100 | | - **self._get_run_extra_info(), |
101 | | - "continued_by_user_at": datetime.now(timezone.utc).strftime( |
102 | | - "%A, %B %d, %Y %H:%M:%S %z" |
103 | | - ), |
104 | | - }) |
| 99 | + metadata = json.dumps( |
| 100 | + { |
| 101 | + **self._get_run_extra_info(), |
| 102 | + "continued_by_user_at": datetime.now(timezone.utc).strftime( |
| 103 | + "%A, %B %d, %Y %H:%M:%S %z" |
| 104 | + ), |
| 105 | + } |
| 106 | + ) |
105 | 107 | assistant_prompt = self._assistant.system if self._assistant.system else "" |
106 | 108 |
|
107 | | - system = caesr_system_prompt(assistant_prompt, metadata) |
108 | | - |
109 | | - return system |
| 109 | + return caesr_system_prompt(assistant_prompt, metadata) |
110 | 110 |
|
111 | 111 | async def _run_agent( |
112 | 112 | self, |
|
0 commit comments