mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-09-05 23:56:37 +08:00
refactor: 移除 ApiClient 中的 count_tokens 抽象方法
- 从 ApiClient 类中删除了 count_tokens 方法的抽象定义,以简化接口。
This commit is contained in:
@@ -21,10 +21,6 @@ class ApiClient(ABC):
|
|||||||
async def stream_generate_content(self, payload: Dict[str, Any], model: str, api_key: str) -> AsyncGenerator[str, None]:
|
async def stream_generate_content(self, payload: Dict[str, Any], model: str, api_key: str) -> AsyncGenerator[str, None]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
async def count_tokens(self, payload: Dict[str, Any], model: str, api_key: str) -> Dict[str, Any]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class GeminiApiClient(ApiClient):
|
class GeminiApiClient(ApiClient):
|
||||||
"""Gemini API客户端"""
|
"""Gemini API客户端"""
|
||||||
|
|||||||
Reference in New Issue
Block a user