diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc index 660a9fa..31567a2 100644 Binary files a/__pycache__/__init__.cpython-312.pyc and b/__pycache__/__init__.cpython-312.pyc differ diff --git a/__pycache__/image_generation.cpython-312.pyc b/__pycache__/image_generation.cpython-312.pyc index 8a6856f..e8fc508 100644 Binary files a/__pycache__/image_generation.cpython-312.pyc and b/__pycache__/image_generation.cpython-312.pyc differ diff --git a/__pycache__/image_preprocessor.cpython-312.pyc b/__pycache__/image_preprocessor.cpython-312.pyc index 7522140..fc49131 100644 Binary files a/__pycache__/image_preprocessor.cpython-312.pyc and b/__pycache__/image_preprocessor.cpython-312.pyc differ diff --git a/__pycache__/image_understanding.cpython-312.pyc b/__pycache__/image_understanding.cpython-312.pyc index e19ecad..9d4aaec 100644 Binary files a/__pycache__/image_understanding.cpython-312.pyc and b/__pycache__/image_understanding.cpython-312.pyc differ diff --git a/__pycache__/llm_loader.cpython-312.pyc b/__pycache__/llm_loader.cpython-312.pyc index 2727b1b..83c89e9 100644 Binary files a/__pycache__/llm_loader.cpython-312.pyc and b/__pycache__/llm_loader.cpython-312.pyc differ diff --git a/__pycache__/model_loader.cpython-312.pyc b/__pycache__/model_loader.cpython-312.pyc index 62182b5..9ce0f0b 100644 Binary files a/__pycache__/model_loader.cpython-312.pyc and b/__pycache__/model_loader.cpython-312.pyc differ diff --git a/__pycache__/openai_compatible_loader.cpython-312.pyc b/__pycache__/openai_compatible_loader.cpython-312.pyc index d9b9eb6..2136297 100644 Binary files a/__pycache__/openai_compatible_loader.cpython-312.pyc and b/__pycache__/openai_compatible_loader.cpython-312.pyc differ diff --git a/llm_loader.py b/llm_loader.py index a1e94bb..fc973a4 100644 --- a/llm_loader.py +++ b/llm_loader.py @@ -26,7 +26,8 @@ class LLM_Loader: "Moonshot/月之暗面", "Baichuan/百川", "MiniMax/MiniMax", - "StepFun/阶跃星辰" + "StepFun/阶跃星辰", + "SenseChat/日日新" ], {}), "model": ("STRING", { "default": "", @@ -52,7 +53,8 @@ class LLM_Loader: "Moonshot/月之暗面": "https://api.moonshot.cn/v1", "Baichuan/百川": "https://api.baichuan-ai.com/v1", "MiniMax/MiniMax": "https://api.minimax.chat/v1", - "StepFun/阶跃星辰": "https://api.stepfun.com/v1" + "StepFun/阶跃星辰": "https://api.stepfun.com/v1", + "SenseChat/日日新": "https://api.sensenova.cn/compatible-mode/v1" } # 获取实际的 base_url diff --git a/openai_compatible_loader.py b/openai_compatible_loader.py index 9cc9925..498ff37 100644 --- a/openai_compatible_loader.py +++ b/openai_compatible_loader.py @@ -118,7 +118,8 @@ class OpenAICompatibleLoader: "Moonshot/月之暗面": "https://api.moonshot.cn/v1", "Baichuan/百川": "https://api.baichuan-ai.com/v1/", "MiniMax/MiniMax": "https://api.minimax.chat/v1/", - "StepFun/阶跃星辰": "https://api.stepfun.com/v1/" + "StepFun/阶跃星辰": "https://api.stepfun.com/v1/", + "SenseChat/日日新": "https://api.sensenova.cn/compatible-mode/v1" } actual_base_url = base_url_mapping.get(base_url.strip(), base_url) @@ -156,8 +157,8 @@ class OpenAICompatibleLoader: "max_tokens": max_tokens } - # 检查是否为星火大模型 - if "spark-api-open.xf-yun.com" in actual_base_url or "api.baichuan-ai.com" in actual_base_url: + # 检查是否为星火大模型或 SenseChat/日日新 + if "spark-api-open.xf-yun.com" in actual_base_url or "api.baichuan-ai.com" in actual_base_url or "api.sensenova.cn" in actual_base_url: # 星火大模型需要 content 为字符串 payload["messages"] = [ {