init project
This commit is contained in:
37
app/Models/EmbeddingEntry.php
Normal file
37
app/Models/EmbeddingEntry.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\EmbeddingEntryFactory;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
#[Fillable([
|
||||
'source_text',
|
||||
'content_hash',
|
||||
'embedding',
|
||||
'embedding_dimensions',
|
||||
'provider',
|
||||
'model',
|
||||
'tokens',
|
||||
])]
|
||||
class EmbeddingEntry extends Model
|
||||
{
|
||||
/** @use HasFactory<EmbeddingEntryFactory> */
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'embedding' => 'array',
|
||||
'embedding_dimensions' => 'integer',
|
||||
'tokens' => 'integer',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user