* [misc] change default min similarity to 0.7 on search knowledges.
This commit is contained in:
@@ -216,8 +216,8 @@ class zai extends control
|
||||
|
||||
if(empty($userPrompt) || empty($filters)) return $this->send(array('result' => 'failed', 'message' => $this->lang->fail));
|
||||
|
||||
$knowledges = $this->zai->searchKnowledgesInCollections($userPrompt, $filters, $type, $limit);
|
||||
$prompts = array();
|
||||
$knowledges = $this->zai->searchKnowledgesInCollections($userPrompt, $filters, $type, $limit, 0.7);
|
||||
$results = [];
|
||||
foreach($knowledges as $knowledge)
|
||||
{
|
||||
$prompts[] = $knowledge['content'];
|
||||
|
||||
Reference in New Issue
Block a user