package com.red.circle.external.inner.endpoint.aichat.minimax;

import com.red.circle.external.inner.endpoint.aichat.minimax.api.MiniMaxClientApi;
import com.red.circle.external.inner.service.aichat.minimax.MiniMaxClientService;
import com.red.circle.framework.dto.ResultResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author lisizhe 2023/11/13  16:27
 */
@Validated
@RestController
@RequestMapping(value = MiniMaxClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class MiniMaxClientEndpoint implements MiniMaxClientApi {

    private final MiniMaxClientService miniMaxClientService;

    @Override
    public ResultResponse<Map<String, String>> chat(String message, String voiceId, Long userId) {
        return ResultResponse.success(miniMaxClientService.chat(message, voiceId, userId));

    }
}
