Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed May 21, 2023
1 parent 884e5bb commit 2a14663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ private String createChatGptPrompt(final String siteId, final String documentId,
throw new IOException("missing 'tags' parameter");
}

DocumentItem item =
this.serviceCache.getExtension(DocumentService.class).findDocument(siteId, documentId);
DocumentItem item = this.documentService.findDocument(siteId, documentId);

DocumentContentFunction docContentFucn = new DocumentContentFunction(this.serviceCache);
List<String> contentUrls = docContentFucn.getContentUrls(siteId, item);
Expand Down Expand Up @@ -157,6 +156,7 @@ private void parseChatGptResponse(final String siteId, final String documentId,

if (!tags.isEmpty()) {
this.documentService.addTags(siteId, documentId, tags, null);
this.documentService.deleteDocumentTag(siteId, documentId, "untagged");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ public void testDocumentTaggingAction02() throws Exception {
"text/plain");

documentService.saveDocument(siteId, item, null);
documentService.addTags(siteId, documentId, Arrays.asList(new DocumentTag(documentId,
"untagged", "", new Date(), "joe", DocumentTagType.SYSTEMDEFINED)), null);

List<Action> actions =
Arrays.asList(new Action().type(ActionType.DOCUMENTTAGGING).parameters(Map.of("engine",
Expand Down

0 comments on commit 2a14663

Please sign in to comment.