소스 검색

Merge branch 'master' of http://192.168.123.2:3000/ck/XiuXianGame

DESKTOP-FB72PO8\Administrator 3 주 전
부모
커밋
ea2f12c5c2

+ 3 - 1
Assets/Scripts/GameLogic/DeepSeekAI/DeepSeekAI.cs

@@ -11,6 +11,8 @@ public class DeepSeekAI
     /// DeepSeek APi 访问地址
     /// </summary>
     private const string BASE_PATH = "https://api.deepseek.com/chat/completions";
+
+    private const string HUOSHAN_BASE_PATH = "https://ark.cn-beijing.volces.com/api/v3/chat/completions";
     /// <summary>
     /// DeepSeek配置
     /// </summary>
@@ -38,7 +40,7 @@ public class DeepSeekAI
         //把消息对象序列成Json字符串
         string jsonMessage = JsonConvert.SerializeObject(requestMessage);
         var client = new HttpClient();
-        var request = new HttpRequestMessage(HttpMethod.Post, BASE_PATH);
+        var request = new HttpRequestMessage(HttpMethod.Post, HUOSHAN_BASE_PATH);
         request.Headers.Add("Accept", "application/json");
         request.Headers.Add("Authorization", $"Bearer {configuration.ApiKey}");
         var content = new StringContent(jsonMessage, null, "application/json");

+ 6 - 3
Assets/Scripts/GameLogic/Player/PlayerManager.cs

@@ -148,17 +148,20 @@ public class PlayerManager : Singleton<PlayerManager>
         fen = fen % 60;
         if (tian > 0)
         {
-            return string.Format(LanguageManager.Instance.Text(818), tian, xiaoShi);
+            return $"{tian}天{xiaoShi}小時";
+            // return string.Format(LanguageManager.Instance.Text(818), tian, xiaoShi);
         }
         else
         {
             if (xiaoShi <= 0 && fen <= 59)
             {
-                return string.Format(LanguageManager.Instance.Text(819), fen, miao);
+                return $"{fen}分{miao}秒";
+                // return string.Format(LanguageManager.Instance.Text(819), fen, miao);
             }
             else
             {
-                return string.Format(LanguageManager.Instance.Text(820), xiaoShi, fen);
+                return $"{xiaoShi}小時{fen}分";
+                // return string.Format(LanguageManager.Instance.Text(820), xiaoShi, fen);
             }
         }
     }

+ 6 - 3
Assets/Scripts/GameUI/UI/ChatPanel/ChatPanel.cs

@@ -9,6 +9,8 @@ namespace Fort23.Mono
     public partial class ChatPanel : UIPanel
     {
         private DeepSeekAI deepSeekAI = new DeepSeekAI("sk-9f161d962acd420e882941b5e41dd3ae");
+        
+        private DeepSeekAI huoSahnAI = new DeepSeekAI("4001c395-31cb-4d27-bec8-8f03cae63c2d");
 
         private List<ChatMessage> messages = new List<ChatMessage>();
 
@@ -73,13 +75,14 @@ namespace Fort23.Mono
 
             var request = new ChatCompletionRequest
             {
-                model = "deepseek-chat",
+                // model = "deepseek-chat",
+                model = "doubao-1.5-pro-32k-250115",
                 messages = messages,
-                max_tokens = 1024,
+                max_tokens = 4096,
             };
 
 
-            var response = await deepSeekAI.SendChatCompletionToDeepSeek(request);
+            var response = await huoSahnAI.SendChatCompletionToDeepSeek(request);
 
             if (response?.choices != null && response.choices.Count > 0)
             {