Lines Matching refs:history
166 * @param array[] $history The chat history [[user, ai], [user, ai], ...]
170 public function askChatQuestion($question, $history = [], $sourcePage = '') argument
172 if ($history && $this->getConf('rephraseHistory') > 0) {
173 $contextQuestion = $this->rephraseChatQuestion($question, $history);
182 return $this->askQuestion($question, $history, $contextQuestion, $sourcePage);
189 * @param array $history [user, ai] of the previous question
195 public function askQuestion($question, $history = [], $contextQuestion = '', $sourcePage = '') argument
230 $history = [];
236 $history,
253 * @param array[] $history The chat history [[user, ai], [user, ai], ...]
257 public function rephraseChatQuestion($question, $history) argument
265 $history,
276 * @param array[] $history The chat history [[user, ai], [user, ai], ...]
283 array $history, argument
293 $messages = $this->historyMessages($history, $remainingContext, $historySize);
306 * @param array[] $history The chat history [[user, ai], [user, ai], ...]
311 protected function historyMessages(array $history, int $tokenLimit, int $sizeLimit): array argument
316 $history = array_reverse($history);
317 $history = array_slice($history, 0, $sizeLimit);
318 foreach ($history as $row) {