Create an interactive chat session with artist context for the gallery curator agent. Returns an ellmer Chat object that maintains conversation state and supports streaming.
The artist's profile, stats, style overview, and collections are loaded as system prompt context so the curator can answer questions about the artist's work.
Arguments
- artist
Character. Artist UUID to load context for.
- provider
Character. AI provider: "gemini" or "openai". If NULL (default), uses
ARTCURATOR_PROVIDERenv var or defaults to "gemini".- cn
Optional DBI connection for
get_agent_ctx(). If NULL, creates and closes connection automatically.
Value
ellmer Chat object with methods:
$chat(...): Send message(s), receive text response$stream(...): Stream response chunks for real-time UI display$chat_structured(prompt, type): Extract structured data$register_tool(tool): Add tools for function calling
See also
Other curator-context:
curator-context
Examples
if (FALSE) { # \dontrun{
# Create chat session
chat <- curator_chat_new("746b8207-72f5-4ab6-8d19-a91d03daec3d")
# Send messages
chat$chat("What are this artist's most notable works?")
chat$chat("How would you describe their artistic style?")
# Stream for real-time UI
stream <- chat$stream("Tell me about their career progression.")
coro::loop(for (chunk in stream) cat(chunk))
# With specific provider
chat_openai <- curator_chat_new(artist, provider = "openai")
} # }
