Versions Compared

Key

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

...

Lets assume the OpenAI secret from above was added under a secret with name openai-secret, then to prompt this OpenAI backlend backend from inside your pipeline you can do something like this:

...

This works the same way with any other AI command.

Chaining multiple AI backends in a pipeline

You can combine multiple AI backends in a single pipeline. Lets assume this example: There is one AI backend which is optimized to extract fields from an invoice and a second one to remove all privacy data, then you can combine them easily using a pipeline like this:

Code Block
languageyaml
pipeline:
  - ai.prompt.send:
      secret: ai-invoice-backend
      input: $uri:drive:invoice.pdf
      prompt: Extract all fields from the invoice.
      
  - ai.prompt.send:
      secret: ai-privacy-backend
      prompt: Make sure there is no privacy related data.

What happens here is:

  1. The invoice PDF is loaded and automatically converted to an AI compatible format.

  2. The prompt is sent with the information extracted from the PDF to the first ai-invoice-backend.

  3. The result of the first prompt is then passed automatically to the next ai-privacy-backend.

This way you can combine the power of multiple AI backend backends to leverage your result.