Skip to content

Commit

Permalink
feat: add support for creating default fields like tags, corresponden…
Browse files Browse the repository at this point in the history
…ts 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.
  • Loading branch information
Björn Urban committed Oct 23, 2024
1 parent e265cc6 commit 30f2142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/paperless_defaultfields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async fn construct_tag_prompt(client: &Client, base_url: &str) -> Result<String,
}
async fn construct_correspondent_prompt(client: &Client, base_url: &str) -> Result<String, Box<dyn StdError + Send + Sync>> {
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)
}

Expand Down

0 comments on commit 30f2142

Please sign in to comment.