From 30f21420a8ab1afb5b140202095b4df022e08efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Wed, 23 Oct 2024 07:58:12 +0200 Subject: [PATCH] feat: add support for creating default fields like tags, correspondents and document types controlled by modes. The results can be a bit inconsistent with the current query so adjust your filter to exclude documents you already have tags for to be safe. BREAKING CHANGE: mode values have changed, value 0 no means NoAnalyze prompting doclytics to do nothing for this field type, use value 1 for the previous behaviour instead. --- src/paperless_defaultfields.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paperless_defaultfields.rs b/src/paperless_defaultfields.rs index a010d58..a29a93d 100644 --- a/src/paperless_defaultfields.rs +++ b/src/paperless_defaultfields.rs @@ -20,7 +20,7 @@ async fn construct_tag_prompt(client: &Client, base_url: &str) -> Result Result> { let document_types = get_default_fields(client, base_url, PaperlessDefaultFieldType::Correspondent).await; - let base_prompt = format!("Determine possible correspondents from this document from the following available correspondents: {:?}, if none of these fit the document, create a new one. The result should be a only a json array of string and nothing else. The answer should start and end with the square bracket. ", document_types); + let base_prompt = format!("Determine possible correspondents from this document from the following available correspondents: {:?}, if none of these fit the document, create a maximum of one new one. The result should be a only a json array of string and nothing else. The answer should start and end with the square bracket. ", document_types); Ok(base_prompt) }