Skip to contents

artopenai 0.10.0

Breaking Changes - API Consolidation

  • Artwork analysis functions deprecated - The following functions are deprecated and will be removed in a future release:

    • art_about_ai() → Use artcurator::art_about_ai() instead
    • art_style_ai() → Use artcurator::art_style_ai() instead
    • classify_styles_ai() → Use artcurator::classify_styles_ai() instead
    • art_profile_ai() → Use artcurator::art_profile_ai() instead
    • art_profile_full_ai() → Use artcurator::art_profile_full_ai() instead

    Rationale: artcurator now provides a unified interface for artwork analysis with provider abstraction (switch between Gemini/OpenAI). All artwork-specific prompts and high-level functions have been consolidated there.

  • Removed internal utilities (now provided by artcore):

    • Removed b64EncodeImage() from R/internal-utils.R → Use artcore::b64EncodeImage()
    • Removed %||% operator definition → Imported from artcore
    • Removed duplicate utility functions from R/internal-utils.R

New Exports - Low-Level API

  • Exported openai_responses() - Previously internal .openai_responses() is now exported for use by artcurator and other packages
    • Provides low-level access to OpenAI Responses API
    • Supports full parameter control: msgs, temp, json_schema, tools, store, prev_response_id, etc.
    • Use for custom prompts and advanced workflows
  • b64EncodeImage() now provided by artcore

Dependencies

  • Added to Imports: artcore (>= 1.4.0) - Provides shared HTTP, config, and image utilities
  • Removed from Imports: base64enc, magick - Now provided by artcore dependency
  • Dependencies alphabetized for consistency

Tests

  • Removed legacy artwork httptest2-based tests that depended on b64EncodeImage() in this package
    • Test files removed: test-artwork-ai.R, test-artwork-plus-ai.R
    • Artwork analysis testing is now handled in the artcurator package alongside the consolidated API

Migration Guide

For artpipelines and Other Consumers

Replace direct artopenai function calls with artcurator:

# Before
artopenai::art_about_ai(img_path)
artopenai::art_style_ai(img_path)

# After
artcurator::art_about_ai(img_path, provider = "openai")
artcurator::art_style_ai(img_path, provider = "openai")

See vignette("artpipelines-integration", package = "artcurator") for complete migration guide.

Low-Level API Remains Available

For custom prompts and advanced use cases, use the exported low-level functions:

# Low-level API (NOT deprecated)
artopenai::openai_responses()
artopenai::openai_with_tools()
artopenai::openai_continue()
artopenai::tool_*()