Explorar el Código

"temperature" => 0.3 "top_k" => 20

visuddhinanda hace 8 meses
padre
commit
710c2be4c2
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      api-v8/app/Services/AiTranslateService.php

+ 2 - 1
api-v8/app/Services/AiTranslateService.php

@@ -273,7 +273,8 @@ class AiTranslateService
                 ["role" => "system", "content" => $message->model->system_prompt ?? ''],
                 ["role" => "user", "content" => $message->prompt],
             ],
-            "temperature" => 0.7,
+            "temperature" => 0.3,  # 低随机性,确保准确
+            "top_k" => 20,         # 限制候选词范围
             "stream" => false
         ];
         if ($this->openaiProxy) {