feat:adds LLM capabilities to chat with your portfolios and holdings
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
|
||||
class AiChat extends Model
|
||||
{
|
||||
use HasUuids;
|
||||
|
||||
protected $fillable = [
|
||||
'role',
|
||||
'content'
|
||||
];
|
||||
|
||||
protected $hidden = [];
|
||||
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($chat) {
|
||||
|
||||
$chat->user_id = auth()->user()->id;
|
||||
});
|
||||
}
|
||||
|
||||
public function user() {
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function chatable()
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user