1<?php 2 3namespace dokuwiki\plugin\aichat\Model; 4 5/** 6 * Interface for all models 7 * 8 * Model classes should inherit from AbstractModel, to avoid handling the statistics themselves. 9 */ 10interface ModelInterface 11{ 12 /** 13 * The name as used by the LLM provider 14 * 15 * @return string 16 */ 17 public function getModelName(); 18 19 /** 20 * Maximum number of tokens the model can handle as input. 21 * 22 * This is the absolute limit, including any context, prompts, questions etc. 23 */ 24 public function getMaxInputTokenLength(): int; 25 26 /** 27 * The price for 1,000,000 input tokens in USD 28 */ 29 public function getInputTokenPrice(): float; 30 31 /** 32 * Reset the usage statistics 33 * 34 * Usually not needed when only handling one operation per request, but useful in CLI 35 */ 36 public function resetUsageStats(); 37 38 /** 39 * Get the usage statistics for this instance 40 * 41 * @return string[] 42 */ 43 public function getUsageStats(); 44} 45