Changeset 3342891
- Timestamp:
- 08/11/2025 12:59:30 PM (8 months ago)
- Location:
- s2b-ai-assistant/trunk
- Files:
-
- 4 edited
-
lib/classes/OpenAi.php (modified) (1 diff)
-
lib/helpers/AiRequest.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
s2b-ai-assistant.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
s2b-ai-assistant/trunk/lib/classes/OpenAi.php
r3252391 r3342891 43 43 $o1_models = $this->o1_models; 44 44 if (isset($model) && array_key_exists($model, $o1_models)) { 45 return true; 46 } 47 48 return false; 49 50 } 51 52 public function check5Model($model = ''){ 53 54 55 if (strpos($model,'pt-5')> 0) { 45 56 return true; 46 57 } -
s2b-ai-assistant/trunk/lib/helpers/AiRequest.php
r3318367 r3342891 73 73 $open_ai = new S2bAia_OpenAi(); 74 74 $if_new_model = $open_ai->checkNewModel($data['model']); 75 $if_5_model = $open_ai->check5Model($data['model']); 75 76 if (!$if_new_model) { 76 77 $msgs = [["role" => "system", "content" => $data['system']]]; … … 81 82 $msgs[] = ['role' => $msg['role'], 'content' => $msg['content']]; 82 83 } 84 } 85 if($if_5_model){ 86 $temperature = 1; 83 87 } 84 88 $body = ["model" => $model, "temperature" => $temperature, … … 87 91 "messages" => $msgs 88 92 ]; 89 if ($if_new_model) { 93 94 if($if_5_model){ 95 $body["max_completion_tokens"] = $max_tokens; 96 } 97 elseif ($if_new_model) { 90 98 $body["max_completion_tokens"] = $max_tokens; 91 99 } else { -
s2b-ai-assistant/trunk/readme.txt
r3338464 r3342891 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 Stable tag: 1.7. 410 Stable tag: 1.7.5 11 11 12 12 Create multiple AI chatbots with OpenAI, Claude, xAI, DeepSeek models with different styles and behavior, content aware features ... … … 266 266 == Changelog == 267 267 268 = 1.7.5 = 269 * Quick fix to add basic GPT-5 model support. Only chat completion API. Full support is coming. 270 268 271 = 1.7.4 = 269 272 * Add Anthropic Claude support -
s2b-ai-assistant/trunk/s2b-ai-assistant.php
r3338464 r3342891 8 8 Text Domain: s2b-ai-assistant 9 9 Domain Path: /lang 10 Version: 1.7. 410 Version: 1.7.5 11 11 License: GPL-2.0+ 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Note: See TracChangeset
for help on using the changeset viewer.