openai_text content provider

blackstork/openai, v0.4.2

Installation

To use the openai_text content provider locally via blackstork-cli, you must declare the blackstork/openai plugin as a dependency in your global configuration block.

blackstork {
  plugin_versions = {
    "blackstork/openai" = ">= v0.4.2"
  }
}

After declaring the dependency, execute blackstork-cli install to fetch the plugin. See Configuration for details.

Configuration

This content provider accepts the following configuration arguments within a config content openai_text block:

config content openai_text {
  # Optional string.
  # Default value:
  system_prompt = null

  # Required string.
  #
  # For example:
  api_key = "some string"

  # Optional string.
  # Default value:
  organization_id = null
}

Usage

This content provider accepts the following arguments within a content openai_text block:

content openai_text {
  # Required string.
  #
  # For example:
  prompt = "Summarize the following text: {{.vars.text_to_summarize}}"

  # Optional string.
  # Must be non-empty
  # Default value:
  model = "gpt-3.5-turbo"
}