discourse-ai/lib
Sam 0d7f353284
FEATURE: AI artifacts (#898)
This is a significant PR that introduces AI Artifacts functionality to the discourse-ai plugin along with several other improvements. Here are the key changes:

1. AI Artifacts System:
   - Adds a new `AiArtifact` model and database migration
   - Allows creation of web artifacts with HTML, CSS, and JavaScript content
   - Introduces security settings (`strict`, `lax`, `disabled`) for controlling artifact execution
   - Implements artifact rendering in iframes with sandbox protection
   - New `CreateArtifact` tool for AI to generate interactive content

2. Tool System Improvements:
   - Adds support for partial tool calls, allowing incremental updates during generation
   - Better handling of tool call states and progress tracking
   - Improved XML tool processing with CDATA support
   - Fixes for tool parameter handling and duplicate invocations

3. LLM Provider Updates:
   - Updates for Anthropic Claude models with correct token limits
   - Adds support for native/XML tool modes in Gemini integration
   - Adds new model configurations including Llama 3.1 models
   - Improvements to streaming response handling

4. UI Enhancements:
   - New artifact viewer component with expand/collapse functionality
   - Security controls for artifact execution (click-to-run in strict mode)
   - Improved dialog and response handling
   - Better error management for tool execution

5. Security Improvements:
   - Sandbox controls for artifact execution
   - Public/private artifact sharing controls
   - Security settings to control artifact behavior
   - CSP and frame-options handling for artifacts

6. Technical Improvements:
   - Better post streaming implementation
   - Improved error handling in completions
   - Better memory management for partial tool calls
   - Enhanced testing coverage

7. Configuration:
   - New site settings for artifact security
   - Extended LLM model configurations
   - Additional tool configuration options

This PR significantly enhances the plugin's capabilities for generating and displaying interactive content while maintaining security and providing flexible configuration options for administrators.
2024-11-19 09:22:39 +11:00
..
ai_bot FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
ai_helper FEATURE: Truncate AI Captions to a reasonable max size (#907) 2024-11-12 15:52:46 -03:00
automation FEATURE: better logging for automation reports (#853) 2024-10-23 16:49:56 +11:00
completions FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
configuration FEATURE: improve visibility of AI usage in LLM page (#845) 2024-10-22 11:16:02 +11:00
database DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
discord/bot FEATURE: Discord Bot integration (#831) 2024-10-16 12:41:18 -03:00
embeddings FIX: testing tool was not showing rag results (#867) 2024-10-25 16:01:25 +11:00
inference Migrate sentiment to a TEI backend (#886) 2024-11-04 09:14:34 -03:00
nsfw DEV: Fix various typos (#434) 2024-01-19 12:51:26 +01:00
sentiment FIX: Move emotion /filter logic into a CTE to keep cardinality sane (#915) 2024-11-14 17:16:48 -03:00
summarization FIX: Regenerate summary button still shows cached summary (#903) 2024-11-07 16:01:18 -08:00
tasks/modules FEATURE: Index embeddings using bit vectors (#824) 2024-10-14 13:26:03 -03:00
tokenizer FIX/REFACTOR: FoldContent revamp (#866) 2024-10-25 11:51:17 -03:00
toxicity FIX: Truncate content for sentiment/toxicity classification (#431) 2024-01-17 15:17:58 -03:00
utils FEATURE: Add basic connection check to DNS SRV resources (#563) 2024-04-12 10:39:19 -03:00
automation.rb FEATURE: allow llm triage to automatically hide posts (#820) 2024-10-04 16:11:30 +10:00
chat_message_classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
engine.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
guardian_extensions.rb FEATURE: Make hot topic gists opt-in. (#846) 2024-10-21 15:15:25 -03:00
multisite_hash.rb FIX: properly cache user locale (#593) 2024-04-26 09:28:35 -03:00
post_classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
summarization.rb FEATURE: Generate topic gists for the hot topics list. (#837) 2024-10-18 18:01:39 -03:00
topic_extensions.rb FEATURE: Generate topic gists for the hot topics list. (#837) 2024-10-18 18:01:39 -03:00