Skip to contents

Produces AI-generated descriptions, style classifications, and marketing profiles for artwork using OpenAI vision models. This content populates artwork pages, search facets, and artist portfolios.

Usage

create_styles_tables(
  artist,
  artwork,
  art_title,
  artist_name,
  drawing_hours,
  brush_strokes,
  img_path = NULL,
  new_utc = NULL
)

create_artwork_profiles(
  artist,
  artwork,
  art_title,
  artist_name,
  art_story = NULL,
  drawing_hours,
  img_path = NULL,
  new_utc = NULL
)

update_artist_style_map(artist, cn = NULL)

Arguments

artist

Character. Artist UUID identifying the creator.

artwork

Character. Artwork UUID for this piece.

art_title

Character. Artwork title for context in AI prompts.

artist_name

Character. Display name shown in generated profiles.

drawing_hours

Numeric. Total creation time for context in profiles.

brush_strokes

Integer. Total brush strokes for context in profiles.

img_path

Character. Path to artwork image for vision model analysis. If NULL, retrieves main.png from CDN.

new_utc

POSIXct. Timestamp for database records. Defaults to now.

art_story

Character. Optional artist-provided backstory or description. When provided, AI incorporates this into the generated profile.

cn

DBI connection. Optional database connection for style map updates.

Details

The AI analysis includes: - Style tags: Color palette, technique, mood, subject matter - Art description: One-paragraph summary of the piece - Marketing profile: Collector-focused description highlighting uniqueness - Full profile: Comprehensive artwork profile combining all elements

Style tags are also aggregated into artist_style_map for faceted search and portfolio organization.

Functions

  • create_styles_tables(): Generate style tags and descriptions for artwork_styles and global_styles tables

  • create_artwork_profiles(): Generate full artwork profile for artwork_profiles table

  • update_artist_style_map(): Incrementally classify new style tags and update artist_style_map