1<?php 2 3namespace dokuwiki\plugin\aichat\test; 4 5use dokuwiki\HTTP\DokuHTTPClient; 6 7/** 8 * Ollama Model Test 9 * 10 * @group plugin_aichat 11 * @group plugins 12 * @group internet 13 */ 14class ModelOllamaTest extends AbstractModelTest 15{ 16 protected string $provider = 'Ollama'; 17 protected string $api_key_env = ''; 18 protected string $chat_model = 'llama3.2'; 19 protected string $embedding_model = 'nomic-embed-text'; 20 21 public function setUp(): void 22 { 23 global $conf; 24 parent::setUp(); 25 26 $conf['plugin']['aichat']['ollama_apiurl'] = 'http://localhost:11434/api'; 27 $url = $conf['plugin']['aichat']['ollama_apiurl'] . '/version'; 28 29 $http = new DokuHTTPClient(); 30 $http->timeout = 4; 31 $result = $http->get($url); 32 33 if (!$result) $this->markTestSkipped('Local Ollama server seems not to be available.'); 34 } 35} 36