13 lines
366 B
Python
13 lines
366 B
Python
from fastapi import APIRouter, Request
|
|
|
|
from app.models.config import TrainingConfig
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/config", response_model=TrainingConfig)
|
|
async def get_training_config(request: Request):
|
|
"""Retrieves the current training configuration"""
|
|
config_manager = request.app.state.config_manager
|
|
return await config_manager.get_config()
|