Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# src/services/llm/base_client.py
|
||||
"""LLM客户端基类 - 统一接口定义"""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
@@ -113,4 +112,4 @@ class BaseLLMClient(ABC):
|
||||
# 中文字符约1.5 token,英文约0.25 token
|
||||
chinese_chars = sum(1 for c in text if '一' <= c <= '鿿')
|
||||
other_chars = len(text) - chinese_chars
|
||||
return int(chinese_chars * 1.5 + other_chars * 0.25)
|
||||
return int(chinese_chars * 1.5 + other_chars * 0.25)
|
||||
|
||||
Reference in New Issue
Block a user