Skip to content

Conversation

@rubenvdlinde
Copy link
Contributor

Overview

This PR adds comprehensive AI functionality to OpenRegister using the LLPhant framework, enabling automatic object enrichment, chat interactions, and vector embeddings.

Features Added

  • AI Service Integration: Complete AiService implementation with LLPhant framework
  • Multi-Provider Support: OpenAI, Ollama, Azure, and Anthropic providers
  • Chat API: Interactive AI chat with context-aware responses
  • Object Enrichment: Automatic text generation and vector embeddings during object creation/updates
  • Settings Management: AI configuration UI and API endpoints
  • Database Schema: Added text and embedding fields to objects table
  • Comprehensive Documentation: Updated with AI functionality guide

API Endpoints

Settings

  • GET /api/settings/ai - Retrieve AI configuration
  • PUT /api/settings/ai - Update AI configuration
  • POST /api/settings/ai/test - Test AI connection

Chat

  • POST /api/chat - AI chat interactions
  • GET /api/chat/capabilities - AI capabilities and status
  • POST /api/chat/generate-text - Generate text representations
  • POST /api/chat/generate-embedding - Generate vector embeddings

Technical Implementation

  • Dependency Injection: Proper AiService registration in Application.php
  • Object Integration: AI enrichment in SaveObject metadata hydration
  • Error Handling: Graceful fallbacks when AI operations fail
  • Performance: Non-blocking AI operations that don't prevent object creation

Testing

  • ✅ AI settings endpoints tested and working
  • ✅ Chat capabilities endpoint functional
  • ✅ Object creation with AI enrichment verified
  • ✅ Dependency injection resolved

Migration

Database migration included to add text and embedding fields to oc_openregister_objects table.

Documentation

Comprehensive AI functionality documentation added to website/docs/Features/ai-functionality.md

- Add LLPhant dependency (theodo-group/llphant:^0.11.4) for AI capabilities
- Add text and embedding fields to ObjectEntity for AI-generated content
- Create database migration for AI fields (Version1Date20250918120000)
- Add comprehensive AI configuration UI with provider selection
- Support multiple AI providers: OpenAI, Ollama, Azure, Anthropic
- Add AI settings store with connection testing and validation
- Create detailed AI functionality documentation
- Enable automatic text generation and vector embeddings for objects

This implements the foundation for semantic search and AI-powered features
using the LLPhant framework with support for various embedding models and
language models from different providers.
- Add AiService for AI operations using LLPhant framework
- Add ChatController for AI chat interactions and text/embedding generation
- Add AI settings endpoints (GET/PUT /api/settings/ai, POST /api/settings/ai/test)
- Add chat API endpoints (/api/chat, /api/chat/capabilities, etc.)
- Integrate AI enrichment into object creation/update workflow
- Add text and embedding fields to ObjectEntity
- Update documentation with comprehensive AI functionality guide
- Support multiple AI providers: OpenAI, Ollama, Azure, Anthropic
- Auto-generate text representations and vector embeddings for objects
- Add AI configuration UI section in settings
- Implement dependency injection for AiService in Application.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants