package com.mortals.xhx.webflux.factory;

import com.mortals.xhx.webflux.dto.ChatBaseParam;
import com.mortals.xhx.webflux.req.RobotTransReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import reactor.core.publisher.FluxSink;

/**
 * 流式问答上下文
 *
 * @author: zxfei
 * @date: 2025/3/13 10:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FlowChatContext {

    /**
     * 前端请求参数
     */
    private RobotTransReq requestParam;

    /**
     * 问答id
     */
    private String msgId;

    /**
     * 对话回答
     */
    private StringBuilder answer;
    /**
     * 对话对应索引
     */
    private StringBuilder docs;

    private FluxSink<String> emitter;

    public FlowChatContext(RobotTransReq requestParam) {
        this.requestParam = requestParam;
    }
}
