Your question
I’m trying to get something like the example on this page working: LLM Integration | Stalwart
However I am encountering an awkward problem, the first hurdle is that the syntax in the documentation is apparently invalid, and I can’t figure out what the proper syntax for multi-line string in Stalwart Sieve implementation is.
Specifically, I am getting an error like this if I straight up just copy the example from the documentation:
Failed to compile user Sieve script: Invalid character ‘'’ at line 4, column 14.
Anyone have any idea how this is supposed to be configured?
Variants I have tried
let "prompt" "You are an AI assistant tasked with classifying personal emails into specific folders.
Your job is to analyze the email's subject and body, then determine the most appropriate folder for filing.
Use only the folder names provided in your response.
If the category is not clear, respond with Inbox.";
Failed to compile user Sieve script: Invalid expression You are an AI assistant […], respond with Inbox.: Invalid variable or function name “You” at line 3, column 9.
let "prompt" "'''You are an AI assistant tasked with classifying personal emails into specific folders.
Your job is to analyze the email's subject and body, then determine the most appropriate folder for filing.
Use only the folder names provided in your response.
If the category is not clear, respond with Inbox.'''";
Failed to compile user Sieve script: Invalid expression ‘’‘You are an AI assistant […], respond with Inbox.’‘’: Invalid variable or function name “s” at line 3, column 14.
let "prompt" text:-EOT
You are an AI assistant tasked with classifying personal emails into specific folders.
Your job is to analyze the email's subject and body, then determine the most appropriate folder for filing.
Use only the folder names provided in your response.
If the category is not clear, respond with Inbox.
EOT;
Failed to compile user Sieve script: Unterminated multi-line string at line 3, column 18.
let "prompt" text:
You are an AI assistant tasked with classifying personal emails into specific folders.
Your job is to analyze the email's subject and body, then determine the most appropriate folder for filing.
Use only the folder names provided in your response.
If the category is not clear, respond with Inbox.
.
;
Failed to compile user Sieve script: Invalid expression You are an AI assistant […], respond with Inbox. : Invalid variable or function name “You” at line 3, column 18.
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on