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: assistants/document-assistant/assistant/filesystem/_prompts.py
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,25 @@
20
20
Files that are read-only are known as "attachments" and are initially appended to user's message at the time they uploaded them. \
21
21
Eventually they might fall out of your context window and you will need to use the `view` tool to read them again if you need it. \
22
22
A summary of the file content has been provided to you to better understand what the file is about.
23
+
There are more files that you can access. First call the `ls` tool to list all files available in the filesystem.
23
24
24
25
### Recent & Relevant Files
25
26
26
27
You can read the following files in again using the `view` tool if they are needed. \
27
-
If they are editable you can also use the `edit_file` tool to edit them."""
28
+
If they are editable you can also use the `edit_file` tool to edit them.
29
+
Paths are mounted at different locations depending on the type of file and you must always use the absolute path to the file, starting with `/` for any path.
30
+
- Editable files are mounted at `/editable_documents/editable_file.md`.
31
+
- User uploaded files or "attachments" are mounted at `/attachments/attachment.pdf`."""
28
32
29
-
FILESYSTEM_ADDON_PROMPT="""### Filesystem
30
33
31
-
**Very important:** This current interaction with the user is long-running and due to context window limitations, the above section can only show a limited number of files. \
32
-
There are more files that you can access. First call the `ls` tool to list all files available in the filesystem. \
33
-
Then, you can use the `view` tool (use it multiple times if needed) to read any of the files that you find relevant to the user's request.\
34
-
This is a similar concept to how you would explore a codebase in a code editor."""
34
+
ARCHIVES_ADDON_PROMPT="""### Conversation Memories and Archives
35
35
36
+
You have a limited context window, which means that some of the earlier parts of the conversation may fall out of your context.
37
+
To help you with that, below you will find summaries of older parts of the conversation that have been "archived". \
38
+
You should use these summaries as "memories" to help you understand the historical context and preferences of the user. \
39
+
Note that some of these archived conversation may still be visible to you in the conversation history.
40
+
If the current user's task requires you to access the full content of the conversation, you can use the `view` tool to read the archived conversations. \
41
+
Historical conversations are mounted at `/archives/conversation_1234567890.json`"""
36
42
37
43
VIEW_TOOL= {
38
44
"type": "function",
@@ -45,7 +51,7 @@
45
51
"properties": {
46
52
"path": {
47
53
"type": "string",
48
-
"description": "The relative path to the file.",
54
+
"description": "The absolute path to the file. Must start with `/` followed by the mount point, e.g. `/editable_documents/filename.md`.",
49
55
},
50
56
},
51
57
"required": ["path"],
@@ -90,8 +96,9 @@
90
96
EDIT_TOOL_DESCRIPTION_HOSTED="""Edits the Markdown file at the provided path, focused on the given task.
91
97
The user has Markdown editor available that is side by side with this chat.
92
98
Remember that the editable files are the ones that have the `-rw-` permission bits. \
99
+
They also must be mounted at `/editable_documents/` and have a `.md` extension. \
93
100
If you provide a new file path, it will be created for you and then the editor will start to edit it (from scratch). \
94
-
Name the file with capital letters and spacing like "Weekly AI Report.md" or "Email to Boss.md" since it will be directly shown to the user in that way.
101
+
Name the file with capital letters and spacing like "/editable_documents/Weekly AI Report.md" or "/editable_documents/Email to Boss.md" since it will be directly shown to the user in that way.
95
102
Provide a task that you want it to do in the document. For example, if you want to have it expand on one section, \
96
103
you can say "expand on the section about <topic x>". The task should be at most a few sentences. \
97
104
Do not provide it any additional context outside of the task parameter. It will automatically be fetched as needed by this tool.
0 commit comments