Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ex_app/lib/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ async def call_model(
Only use tools if you cannot answer the user without them.
If you get a link as a tool output, always add the link to your response.
Do not blindly trust old tool results, the state of the various apps may have changed since the result was generated.
Before changing or overwriting something that already exists (e.g. a file, a page, a table row, a card), fetch its current content right before writing and base your change on that, not on an earlier tool result, the conversation or the user's description. If the current content differs from what you or the user assumed it to be, do not write; tell the user what changed and ask how to proceed.
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.
"""
if tool_enabled("duckduckgo_results_json"):
Expand Down
3 changes: 2 additions & 1 deletion ex_app/lib/all_tools/collectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ async def create_page(collective_id: int, parent_id: int, title: str):
async def update_page_content(collective_id: int, page_id: int, content: str):
"""
Overwrite the Markdown content of a Collectives page.
Replaces the entire page body. To append, first read with get_page_content and concatenate.
Replaces the entire page body. Always read it with get_page_content right before writing, base
your change on that content and make sure it is what you expect. To append, concatenate to it.
If another user has the page open in the real-time editor, their session may overwrite this
write on save - consider rename_page or trash_page for destructive intent instead.
A note saying the page was edited with the help of the AI Assistant is appended
Expand Down
1 change: 1 addition & 0 deletions ex_app/lib/all_tools/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ async def create_public_sharing_link(path: str):
async def upload_file(path: str, content: str):
"""
Upload or create a new file with text content
If a file already exists at the path, it is overwritten entirely. Read it with get_file_content right before overwriting and make sure its current content is what you expect.
:param path: the path where the file should be created (e.g., "/Documents/myfile.txt")
:param content: the text content to write to the file
:return: success confirmation
Expand Down
Loading