mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-10-14 09:49:19 +00:00
15 lines
457 B
Python
15 lines
457 B
Python
from typing import Dict, Any
|
|
from src.backend.app.services.ai_services import AIService
|
|
from src.backend.config import settings
|
|
|
|
|
|
class CommandParser:
|
|
def __init__(self):
|
|
self.ai_service = AIService(settings.SILICONFLOW_API_KEY, settings.SILICONFLOW_API_URL)
|
|
|
|
async def parse(self, command: str) -> Dict[str, Any]:
|
|
"""
|
|
解析中文命令并返回配置
|
|
"""
|
|
return await self.ai_service.parse_command(command)
|