package com.vetti.web.controller.ai;

import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.R;
import com.vetti.web.entity.dto.ConvAiTokenDto;
import com.vetti.web.entity.dto.HotakeAiInterviewScoringDto;
import com.vetti.web.entity.vo.HotakeAiInterviewScoringVo;
import com.vetti.web.service.IElevenLabsConvAiTokenClientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * AI ElevemLabs Agent 信息Controller
 *
 * @author wangxiangshun
 * @date 2025-12-14
 */
@Api(tags ="AI ElevemLabs Agent")
@RestController
@RequestMapping("/hotake/elevenLabsConvAi")
public class HotakeElevenLabsConvAiTokenClientController extends BaseController {

    @Autowired
    private IElevenLabsConvAiTokenClientService convAiTokenClientService;


    /**
     * 获取ElevemLabs Agent令牌
     */
    @ApiOperation("获取ElevemLabs Agent令牌")
    @PostMapping(value = "/getToken")
    public R<ConvAiTokenDto> handleElevemLabsAgentToken()
    {
        return R.ok(convAiTokenClientService.getConvAiToken());
    }

    /**
     * AI语音面试结果评分处理
     */
    @ApiOperation("AI语音面试结果评分处理")
    @PostMapping(value = "/aiInterviewScoring")
    public R<HotakeAiInterviewScoringDto> handleAiInterviewScoring(@RequestBody HotakeAiInterviewScoringVo scoringVo)
    {
        return R.ok(convAiTokenClientService.getAiInterviewScoring(scoringVo));
    }


}
