package com.backendsys.modules.ai.chat.controller;

import com.backendsys.modules.ai.chat.entity.ChatHistory;
import com.backendsys.modules.ai.chat.service.ChatHistoryService;
import com.backendsys.modules.ai.chat.service.ChatModelService;
import com.backendsys.modules.common.config.security.utils.SecurityUtil;
import com.backendsys.modules.common.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@Tag(name = "AI对话-模型")
public class ChatModelController {

    @Autowired
    private ChatModelService chatModelService;

    @Operation(summary = "获取模型列表")
    @PreAuthorize("@sr.hasPermission('31')")
    @GetMapping("/api/ai/chat/getChatModelList")
    public Result getChatModelList() {
        return Result.success().put("data", chatModelService.selectChatModelList());
    }

}
