Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyaml
pipeline:

  # Read email from inbox
  - imap.get:
      host: outlook.office365.com
      secret: my-office365-secret

  # Detect the intent in the email
  - ai.intent.detect:
      advice:
        intentCandidates:
          - intentId: "invoice"
            instruction: "Use this intent in case the attachment is an invoice."
            params:
              supplierAddress:
                instruction: "Extract the supplier address from the invoice."
              invoiceNumber:
                instruction: "Extract the invoice number from the invoice."
              totalAmount:
                instruction: "Extract the total amount of the invoice in cents without any currency chars, separators or other special characters."
          - intentId: "teminationtermination"
            instruction: "Use this intent in case the attachment is a termination of a contract."
            params:
                contractNumber:
                  instruction: "Extract the contract number."
                customerNumber:
                  instruction: "Extract the customer number."
                reason:
                  instruction: "Summarize in one sentence the reason for the termination."
          - intentId: "documentation"
            instruction: "Use this intent in case the attachment is a documentation."
            params:
                summary:
                  instruction: "Create a short summary what this documentation is about."

...