* add get role templates method.
This commit is contained in:
@@ -271,6 +271,7 @@ class ai extends control
|
||||
$this->view->promptID = $promptID;
|
||||
$this->view->lastActiveStep = $this->ai->getLastActiveStep($prompt);
|
||||
$this->view->title = "{$this->lang->ai->prompts->common}#{$prompt->id} $prompt->name {$this->lang->colon} " . $this->lang->ai->prompts->assignRole . " {$this->lang->colon} " . $this->lang->ai->prompts->common;
|
||||
$this->view->roleTemplates = $this->ai->getRoleTemplates();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1134,4 +1134,17 @@ class aiModel extends model
|
||||
|
||||
$_SESSION['aiInjectData'][$targetForm->m][$targetForm->f] = is_string($data) ? $data : json_encode($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get role templates from db.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRoleTemplates()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PROMPTROLE)
|
||||
->where('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user