From e8a191d492fd56b50d5b95716bedaa191de8e435 Mon Sep 17 00:00:00 2001 From: kanchengw Date: Wed, 27 May 2026 21:31:02 +0800 Subject: [PATCH] add properties on chunk --- cnllm/core/vendor/baidu.py | 4 ++-- cnllm/core/vendor/glm.py | 4 ++-- cnllm/core/vendor/minimax.py | 2 +- cnllm/core/vendor/qwen.py | 4 ++-- tests/test_yaml_response.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cnllm/core/vendor/baidu.py b/cnllm/core/vendor/baidu.py index c53fd72..af9c2fc 100644 --- a/cnllm/core/vendor/baidu.py +++ b/cnllm/core/vendor/baidu.py @@ -104,7 +104,7 @@ def _load_config(self) -> Dict[str, Any]: import os config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", self.config_dir, + "..", "..", "configs", self.config_dir, f"response_{self.config_dir}.yaml" ) try: @@ -141,7 +141,7 @@ def _load_class_config(cls) -> Dict[str, Any]: config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", cls.CONFIG_DIR, + "..", "..", "configs", cls.CONFIG_DIR, f"request_{cls.CONFIG_DIR}.yaml" ) diff --git a/cnllm/core/vendor/glm.py b/cnllm/core/vendor/glm.py index fb5c060..b0da81a 100644 --- a/cnllm/core/vendor/glm.py +++ b/cnllm/core/vendor/glm.py @@ -178,7 +178,7 @@ def _load_config(self) -> Dict[str, Any]: import yaml config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", self.config_dir, + "..", "..", "configs", self.config_dir, f"response_{self.config_dir}.yaml" ) try: @@ -215,7 +215,7 @@ def _load_class_config(cls) -> Dict[str, Any]: config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", cls.CONFIG_DIR, + "..", "..", "configs", cls.CONFIG_DIR, f"request_{cls.CONFIG_DIR}.yaml" ) diff --git a/cnllm/core/vendor/minimax.py b/cnllm/core/vendor/minimax.py index 5c2e976..1b98e92 100644 --- a/cnllm/core/vendor/minimax.py +++ b/cnllm/core/vendor/minimax.py @@ -110,7 +110,7 @@ def _load_class_config(cls) -> Dict[str, Any]: return cls._class_config config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", cls.CONFIG_DIR, "request_minimax.yaml" + "..", "..", "configs", cls.CONFIG_DIR, "request_minimax.yaml" ) try: import yaml diff --git a/cnllm/core/vendor/qwen.py b/cnllm/core/vendor/qwen.py index 8f73d33..4831fb4 100644 --- a/cnllm/core/vendor/qwen.py +++ b/cnllm/core/vendor/qwen.py @@ -96,7 +96,7 @@ def _load_config(self) -> Dict[str, Any]: import os config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", self.config_dir, + "..", "..", "configs", self.config_dir, f"response_{self.config_dir}.yaml" ) try: @@ -138,7 +138,7 @@ def _load_class_config(cls) -> Dict[str, Any]: config_path = os.path.join( os.path.dirname(__file__), - "..", "..", "..", "configs", cls.CONFIG_DIR, + "..", "..", "configs", cls.CONFIG_DIR, f"request_{cls.CONFIG_DIR}.yaml" ) diff --git a/tests/test_yaml_response.py b/tests/test_yaml_response.py index 85d17cb..4205e34 100644 --- a/tests/test_yaml_response.py +++ b/tests/test_yaml_response.py @@ -25,7 +25,7 @@ class TestResponseYAML: def response_config(self): config_path = os.path.join( os.path.dirname(__file__), - "..", "configs", "xiaomi", "response_xiaomi.yaml" + "..", "cnllm", "configs", "xiaomi", "response_xiaomi.yaml" ) with open(config_path, 'r', encoding='utf-8') as f: return yaml.safe_load(f)