Skip to content

Commit

Permalink
Merge branch 'main' of github.com:vormkracht10/laravel-gpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Casmo committed Nov 17, 2023
2 parents fcc1e3f + 13fc92d commit 209a0d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Engines/OpenAiEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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).']',
]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Gptable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

/**
Expand Down

0 comments on commit 209a0d2

Please sign in to comment.