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: python/README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ The application current has three main functions:
39
39
2. Ingest Status
40
40
3. Rewrite
41
41
4. Chat
42
+
5. Delete (References)
42
43
43
44
### Ingest
44
45
`Ingest` is called when a Refstudio user uploads Reference documents.
@@ -182,4 +183,34 @@ $ poetry run python main.py --text "What can you tell me about hidden feedback l
182
183
"text": "Hidden feedback loops in machine learning refer to situations where two systems indirectly influence each other through the world, leading to changes in behavior that may not be immediately visible. These loops may exist between completely disjoint systems and can make analyzing the effect of proposed changes extremely difficult, adding cost to even simple improvements. It is recommended to look carefully for hidden feedback loops and remove them whenever feasible."
183
184
}
184
185
]
186
+
```
187
+
188
+
### Delete (References)
189
+
`delete` removes a Reference from project storage. It is called when a Reference is deleted from the UI.
190
+
191
+
It takes a list of `source_filenames` as input and returns a response status. Alternatively, you can use the `--all` parameter to delete all References in storage.
192
+
193
+
To run `delete`:
194
+
195
+
```bash
196
+
$ poetry run python main.py delete --source_filenames grobid-fails.pdf "Machine Learning at Scale.pdf"
197
+
198
+
199
+
# Example:
200
+
$ poetry run python main.py delete --source_filenames grobid-fails.pdf "Machine Learning at Scale.pdf"| jq
201
+
202
+
# Response:
203
+
{
204
+
"status": "ok",
205
+
"message": ""
206
+
}
207
+
208
+
# Another Example (error):
209
+
$ poetry run python main.py delete --source_filenames file-does-not-exist.pdf | jq
210
+
211
+
# Error Response:
212
+
{
213
+
"status": "error",
214
+
"message": "Unable to delete file-does-not-exist.pdf: not found in storage"
0 commit comments