26 lines
461 B
PHP
26 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Pgvector\Laravel\HasNeighbors;
|
|
use Pgvector\Laravel\Vector;
|
|
|
|
class Memory extends Model
|
|
{
|
|
use HasFactory;
|
|
use HasNeighbors;
|
|
|
|
protected $fillable = [
|
|
'content',
|
|
'metadata',
|
|
'embedding',
|
|
];
|
|
|
|
protected $casts = [
|
|
'metadata' => 'array',
|
|
'embedding' => Vector::class,
|
|
];
|
|
}
|