소스 정보
- 저장소
- Azure-Samples/art-voice-agent-accelerator
- 최근 소스 활동
- 2026년 1월 26일 18:43
- 감지된 SKILL.md 언어
- 영어
- 스타
- 73
- 포크
- 62
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Azure-Samples/art-voice-agent-accelerator --skill add-endpoint명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | add-endpoint |
| description | Add a new FastAPI endpoint to the API |
Add endpoints to apps/artagent/backend/api/v1/endpoints/.
"""
Endpoint Module
===============
Brief description of endpoints in this module.
"""
from __future__ import annotations
from fastapi import APIRouter, HTTPException, Request
from pydantic import BaseModel, Field
from utils.ml_logging import get_logger
logger = get_logger(__name__)
router = APIRouter()
# ═══════════════════════════════════════════════════════════════════════════════
# SCHEMAS
# ═══════════════════════════════════════════════════════════════════════════════
class MyRequest(BaseModel):
"""Request model for the endpoint."""
field1: str = Field(..., description="Required field")
field2: int | None = Field(None, description="Optional field")
class MyResponse(BaseModel):
"""Response model for the endpoint."""
success: bool
data: str
# ═══════════════════════════════════════════════════════════════════════════════
# ENDPOINTS
# ═══════════════════════════════════════════════════════════════════════════════
@router.get("/resource", response_model=MyResponse, tags=["Category"])
async def get_resource(request: Request) -> MyResponse:
"""
Get a resource.
Returns the resource data.
"""
return MyResponse(success=True, data="result")
@router.post("/resource", response_model=MyResponse, tags=["Category"])
async def create_resource(request: Request, body: MyRequest) -> MyResponse:
"""
Create a new resource.
Args:
body: The resource data to create.
"""
logger.info("Creating resource: %s", body.field1)
return MyResponse(success=True, data=body.field1)
api/v1/endpoints/ or edit existingtags=["Category"] for OpenAPI groupingapi/v1/__init__.pyIn apps/artagent/backend/api/v1/__init__.py:
from apps.artagent.backend.api.v1.endpoints import my_module
api_router.include_router(
my_module.router,
prefix="/my-resource",
tags=["MyResource"],
)
@router.get("/resource")
async def get_resource(request: Request):
redis = request.app.state.redis_client
# Use redis...
@router.get("/resource/{resource_id}")
async def get_resource(resource_id: str) -> MyResponse:
...
@router.get("/resources")
async def list_resources(
limit: int = 10,
offset: int = 0,
) -> list[MyResponse]:
...
@router.get("/resource/{id}")
async def get_resource(id: str) -> MyResponse:
resource = await fetch_resource(id)
if not resource:
raise HTTPException(status_code=404, detail="Resource not found")
return resource
Use consistent tags:
Health - Health/readiness endpointsCalls - Call managementAgents - Agent operationsVoice - Voice/speech operationsSessions - Session managementFor reusable schemas, add to api/v1/schemas/:
# api/v1/schemas/my_schemas.py
from pydantic import BaseModel
class SharedSchema(BaseModel):
field: str
For models with timestamps/IDs, extend base:
from apps.artagent.backend.api.v1.models.base import BaseModel
class MyModel(BaseModel):
field: str
# Automatically gets id, created_at, updated_at