mirror of
https://gitee.com/qqtt-ah/ai-crm.git
synced 2026-11-24 08:29:20 +08:00
refactor: 移除 Redis/Rabbit 依赖,Agent Mongo 切至 ai_crm_angent_dev
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
"""内存空实现:暂不接 Redis,LLM 运行时每次走 Server 内部 API。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from domain.models import LlmProtocolCapability, LlmRuntimeConfig
|
||||
from domain.ports import LlmProtocolCapabilityCache, LlmRuntimeCache
|
||||
|
||||
|
||||
class NoopLlmRuntimeCache(LlmRuntimeCache):
|
||||
async def get(
|
||||
self,
|
||||
company_id: int,
|
||||
provider_id: int | None = None,
|
||||
model: str | None = None,
|
||||
) -> LlmRuntimeConfig | None:
|
||||
return None
|
||||
|
||||
async def set(
|
||||
self,
|
||||
company_id: int,
|
||||
config: LlmRuntimeConfig,
|
||||
ttl_seconds: int,
|
||||
) -> None:
|
||||
return None
|
||||
|
||||
async def delete(self, company_id: int) -> None:
|
||||
return None
|
||||
|
||||
|
||||
class NoopLlmProtocolCapabilityCache(LlmProtocolCapabilityCache):
|
||||
async def get(
|
||||
self, *, provider_id: int | None, base_url: str
|
||||
) -> LlmProtocolCapability | None:
|
||||
return None
|
||||
|
||||
async def set(
|
||||
self,
|
||||
*,
|
||||
provider_id: int | None,
|
||||
base_url: str,
|
||||
capability: LlmProtocolCapability,
|
||||
ttl_seconds: int,
|
||||
) -> None:
|
||||
return None
|
||||
Reference in New Issue
Block a user