Skip to content

Commit d34465a

Browse files
committed
Update KnowledgeBase.php
1 parent a39577e commit d34465a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/KnowledgeBase.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Borah\KnowledgeBase;
44

55
use Borah\KnowledgeBase\Client\KnowledgeBaseClient;
6+
use Borah\KnowledgeBase\DTO\KnowledgeBaseQueryResponse;
67
use Illuminate\Database\Eloquent\Model;
78
use Illuminate\Support\Collection;
89

@@ -33,4 +34,11 @@ public function destroy(Model $model): bool
3334

3435
return $client->destroy($items[0]->id);
3536
}
37+
38+
public function query(string $text, int $k = 10, ?array $entities = null, ?array $where = null): KnowledgeBaseQueryResponse
39+
{
40+
$client = new KnowledgeBaseClient();
41+
42+
return $client->query($text, $k, $entities, $where);
43+
}
3644
}

0 commit comments

Comments
 (0)