From f836df44018636e98cd57498f2b8634e29b7b5f5 Mon Sep 17 00:00:00 2001 From: Josh Embling Date: Sun, 3 Dec 2023 14:06:57 +0000 Subject: [PATCH] Add migrations --- database/migrations/create_laragenie_table.php.stub | 10 ++++++---- src/Models/Laragenie.php | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/Models/Laragenie.php diff --git a/database/migrations/create_laragenie_table.php.stub b/database/migrations/create_laragenie_table.php.stub index 365deab..435c0c0 100644 --- a/database/migrations/create_laragenie_table.php.stub +++ b/database/migrations/create_laragenie_table.php.stub @@ -2,17 +2,19 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Query\Expression; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up() { - Schema::create('laragenie_table', function (Blueprint $table) { + Schema::create('laragenie_responses', function (Blueprint $table) { $table->id(); - - // add fields - + $table->text('question', 50000); + $table->text('answer', 50000)->nullable(); + $table->double('cost', 8, 2)->nullable(); + $table->json('question_embedding')->default(new Expression('(JSON_ARRAY())')); $table->timestamps(); }); } diff --git a/src/Models/Laragenie.php b/src/Models/Laragenie.php new file mode 100644 index 0000000..2acb9be --- /dev/null +++ b/src/Models/Laragenie.php @@ -0,0 +1,10 @@ +