package com.sonic.cow.service;

import com.sonic.cow.client.input.voicechat.domain.UserPrompt;
import com.sonic.cow.client.request.InputRequest;
import com.sonic.cow.event.outer.payload.AiChatPayload;
import com.sonic.frog.lib.output.AiInfoApiOutput;
import com.sonic.pigeon.lib.output.HistoryMessageOutput;

import java.util.List;

/**
 * 聊天入参构建
 */
public interface InputRequestBuildService {

    /**
     * 构造聊天入参
     *
     * @param payload
     * @param inputRequests
     */
    void buildV2(AiChatPayload payload, List<InputRequest> inputRequests, Integer historyMessageLimit, Boolean isText);

    /**
     * 构造开启语音通话的开场白的聊天上下文
     *
     * @param inputRequests
     * @param systemPrompt
     * @param historyMessageList
     */
    void buildStartVoiceChatDialoguePrologue(Long fromUserId, Long toUserId, List<InputRequest> inputRequests,String systemPrompt, List<HistoryMessageOutput> historyMessageList);

    /**
     * 构造语音通话系统提示语
     *
     * @param fromUserId
     * @param toUserId
     * @return
     */
    String buildVoiceChatSystemPromptContent(Long fromUserId, Long toUserId, AiInfoApiOutput aiUserInfo);

    /**
     * 构造系统提示语
     *
     * @param fromUserId
     * @param toUserId
     * @return
     */
    String buildSystemPromptContent(Long fromUserId, Long toUserId, AiInfoApiOutput aiUserInfo);


    /**
     * 获取用户与ai的历史消息
     *
     * @param fromUserId
     * @param toUserId
     * @param limitNum
     * @return
     */
    List<HistoryMessageOutput> getHistoryMessageList(Long fromUserId, Long toUserId, Integer limitNum);

    /**
     * 构建语音通话用户提示语
     *
     * @param fromUserId
     * @param toUserId
     * @return
     */
    List<UserPrompt> buildVoiceChatUserPrompts(Long fromUserId, Long toUserId, List<HistoryMessageOutput> historyMessageList);

    /**
     * 构建语音通话情绪打分提示语
     *
     * @param content
     * @return
     */
    String buildVoiceCallEmotionScorePromptContent(String content);
}
