diff --git a/src/Engines/OpenAiEngine.php b/src/Engines/OpenAiEngine.php index 648d633..a4e1c01 100644 --- a/src/Engines/OpenAiEngine.php +++ b/src/Engines/OpenAiEngine.php @@ -61,14 +61,14 @@ private function saveObjects($objects) foreach ($objects as $object) { $embed = $this->embed($object['content']); - + DB::connection(config('gpt.database.connection')) ->table(config('gpt.database.table')) ->updateOrInsert([ 'foreign_id' => $object['objectID'], ], [ 'content' => $object['content'], - 'embedding' => '['. implode(',', $embed) .']', + 'embedding' => '['.implode(',', $embed).']', ]); } } diff --git a/src/Gptable.php b/src/Gptable.php index 5bc0695..2ed65b7 100755 --- a/src/Gptable.php +++ b/src/Gptable.php @@ -251,7 +251,7 @@ public function gptableAs() */ public function toGptableString() { - return strip_tags(implode(', ', $this->contentable->toArray()) . implode(', ', $this->toArray())); + return strip_tags(implode(', ', $this->contentable->toArray()).implode(', ', $this->toArray())); } /**