You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ex_app/lib/agent.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ async def call_model(
127
127
At the end of each message to the user, if you have carried out a task or answered a question, suggest up to three actions for things you can do for the user based on the tools you have available and details of the previous task. For example: If the user wants to know the weather for some location, they might be planning an event, you can suggest to create an event for them, or if they searched for a file, they may want to share it with others, suggest to create a share link for them, if they want a summary of something, you can suggest them to send the summary to somebody.
128
128
"""
129
129
iftool_enabled("duckduckgo_results_json"):
130
-
system_prompt_text+="Only use the duckduckgo_results_json tool if the user explicitly asks for a web search.\n"
130
+
system_prompt_text+="Use the duckduckgo_results_json tool if the user explicitly asks for a web search or you don't know about a topic or concept that the user is referencing.\n"
131
131
iftool_enabled("list_talk_conversations"):
132
132
system_prompt_text+="Use the list_talk_conversations tool to check which conversations exist.\n"
133
133
iftool_enabled("list_calendars"):
@@ -137,11 +137,13 @@ async def call_model(
137
137
iftool_enabled("find_person_in_users"):
138
138
system_prompt_text+="Use the find_person_in_users tool to find a person's userId and user details.\n"
139
139
iftool_enabled("find_details_of_current_user"):
140
-
system_prompt_text+="Use the find_details_of_current_user tool to find the current user's location.\n"
140
+
system_prompt_text+="Use the find_details_of_current_user tool to find the current user's location and timezone.\n"
141
141
iftool_enabled("list_mails"):
142
142
system_prompt_text+="Always check for the mail account id before requesting a folder list.\n"
143
+
iftool_enabled("web_fetch"):
144
+
system_prompt_text+="Use the web_fetch tool to fetch web content. You can fetch the complete page content of a duckduckgo search result using web_fetch as well.\n"
system_prompt_text+="You can remember things from other conversations with the user. If relevant, take into account the following memories:\n\n"+"\n".join(task['input']['memories']) +"\n\n"
146
148
# this is similar to customizing the create_react_agent with state_modifier, but is a lot more flexible
Create a Scheduled Task for the assistant that will be carried out autonomously.
19
+
The user will still have to approve sensitive actions.
20
+
For example, the user could ask to transcribe new files in a certain folder every hour. Then the
21
+
prompt argument for this tool would be "Transcribe new files in folder /Audio" and the recurrence_rule would be "FREQ=HOURLY".
22
+
After having created the Scheduled Task, let the user know that the Scheduled Task will run in a newly created chat session.
23
+
:param title: A title for the Scheduled Task, e.g. "Transcribe audio files" -- This is only for the user's reference and has no effect on the execution of the Scheduled Task.
24
+
:param prompt: The instructions for the AI carrying out the Scheduled Task
25
+
:param recurrence_rule: An RRule compliant with RFC 5545 that defines the recurrence rule for the Scheduled Task. For example "FREQ=DAILY;INTERVAL=1" to run the Scheduled Task every day, an empty string as the recurrence_rule means the task does not repeat.
26
+
:param starts_at: A date time string in ISO 8601 format that defines when the Scheduled Task should start. For example "2025-01-01T09:00:00Z". If not provided, the Scheduled Task will start immediately. Make sure to use the user's timezone for this, obtainable with find_details_of_current_user
27
+
:param timezone: Timezone (e.g., 'America/New_York') defaults to the user's current time zone
:param id: The ID of the Scheduled Task to update, you can obtain this from the list_scheduled_tasks tool
57
+
:param prompt: The instructions for the AI carrying out the Scheduled Task. Pass `None` to leave this unchanged.
58
+
:param recurrence_rule: An RRule compliant with RFC 5545 that defines the recurrence rule for the Scheduled Task. For example "FREQ=DAILY;INTERVAL=1" to run the Scheduled Task every day. An empty string means, it does not repeat. Pass `None` to leave this unchanged.
59
+
:param timezone A timezone for the scheduled task, set to None to leave this as is.
60
+
:param starts_at: A date time string in ISO 8601 format that defines when the Scheduled Task should start. For example "2025-01-01T09:00:00Z". If not provided, the Scheduled Task will start immediately. Pass `None` to leave this unchanged.
0 commit comments