Lines Matching +full:- +full:- +full:debug
17 protected $debug = false; variable in dokuwiki\\plugin\\aichat\\ModelFactory
24 $this->config = $config;
34 $this->config = array_merge($this->config, $config);
35 $this->chatModel = null;
36 $this->rephraseModel = null;
37 $this->embeddingModel = null;
41 * Set the debug flag for all models
43 * @param bool $debug
45 public function setDebug(bool $debug = true) argument
47 $this->debug = $debug;
48 $this->getChatModel()->setDebug($debug);
49 $this->getRephraseModel()->setDebug($debug);
50 $this->getEmbeddingModel()->setDebug($debug);
61 if ($this->chatModel instanceof ChatInterface) {
62 return $this->chatModel;
64 $this->chatModel = $this->loadModel('chat', $this->config['chatmodel']);
65 $this->chatModel->setDebug($this->debug);
66 return $this->chatModel;
77 if ($this->rephraseModel instanceof ChatInterface) {
78 return $this->rephraseModel;
80 $this->rephraseModel = $this->loadModel('chat', $this->config['rephrasemodel']);
81 $this->rephraseModel->setDebug($this->debug);
82 return $this->rephraseModel;
92 if ($this->embeddingModel instanceof EmbeddingInterface) {
93 return $this->embeddingModel;
95 $this->embeddingModel = $this->loadModel('embedding', $this->config['embedmodel']);
96 $this->embeddingModel->setDebug($this->debug);
97 return $this->embeddingModel;
123 $info['instance'] = $this->loadModel($type, "$namespace $name");
124 $info['instance']->setDebug($this->debug);
163 $instance = new $class($model, $this->config);
165 … throw new \Exception("Failed to initialize $cname for $namespace: " . $e->getMessage(), 1002, $e);