AI provider management
* OpenAI-compatible provider adapter * OpenAI support * LM Studio support * Ollama OpenAI-compatible support * Encrypted API-key storage * Default provider and model selection * Provider connection testing * Reusable prompt library * Prompt variables and templates * Prompt version field * AI execution history * Token-usage storage * Duration and failure tracking * Manual knowledge sources * Knowledge-source chunking * Knowledge indexing status * Authenticated AI REST endpoint * AI administration dashboard * AI permissions * Module registration and boot test
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Modules\AI\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
final class AIKnowledgeSource extends Model
|
||||
{
|
||||
protected $fillable=['name','source_kind','source_type','source_id','content','checksum','metadata','status','chunk_count','indexed_at'];
|
||||
protected $casts=['metadata'=>'array','indexed_at'=>'datetime'];
|
||||
public function source(): MorphTo { return $this->morphTo(); }
|
||||
public function chunks(): HasMany { return $this->hasMany(AIKnowledgeChunk::class); }
|
||||
}
|
||||
Reference in New Issue
Block a user