Source
yaml
id: generate-seo-summary
namespace: company.team
inputs:
  - id: article_url
    type: STRING
    defaults: https://raw.githubusercontent.com/kestra-io/docs/main/content/blogs/2024-06-04-release-0-17.md
tasks:
  - id: fetch_article
    type: io.kestra.plugin.core.http.Download
    uri: "{{ inputs.article_url }}"
  - id: generate_seo_summary
    type: io.kestra.plugin.openai.ChatCompletion
    apiKey: sk-proj-xxx
    model: gpt-4o-mini
    maxTokens: 500
    prompt: |
      Write a short max. 200 words SEO-optimized summary for the following
      article:
      {{ read(outputs.fetch_article.uri) }}
  - id: log_output
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.generate_seo_summary.choices | jq('.[].message.content') |
      first }}"
About this blueprint
AI API
This flow fetches an article from a URL and generates an SEO summary using the OpenAI plugin. The summary is then logged to the console.
More Related Blueprints