package com.xueyi.nlt.api.nlt.feign;

import com.alibaba.fastjson.JSONObject;
import com.xueyi.common.core.web.result.AjaxResult;
import com.xueyi.nlt.api.nlt.domain.vo.KnowledgeVo;
import com.xueyi.nlt.api.nlt.feign.factory.RemoteQAFallbackFactory;
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity;
import com.xueyi.system.api.sms.feign.factory.RemoteSmsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 问答服务
 * @Param man_id 机器人id
 * @Param question 问题
 * @Param tenant_id 租户id
 * @author yrx
 */
@FeignClient(url = "${notification.qa.url}",name = "qa", fallbackFactory = RemoteQAFallbackFactory.class)
public interface RemoteQAService {

    @GetMapping("/knowledge")
    AjaxResult query(@RequestParam(value = "man_code") String manCode, @RequestParam(value = "question") String question, @RequestParam(value = "tenant_id") Long tenantId);
    @PostMapping ("/knowledge")
    AjaxResult query(@RequestBody KnowledgeVo vo);

}