geo/backend/app/workers/platforms/base.py

18 lines
407 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from abc import ABC, abstractmethod
class BasePlatformAdapter(ABC):
"""AI平台查询适配器基类"""
platform_name: str # 平台枚举值
platform_url: str # 平台URL
@abstractmethod
async def query(self, keyword: str) -> str:
"""在AI平台查询关键词返回原始响应文本"""
pass
async def close(self):
"""清理资源"""
pass