zhou zhou
15 小时以前 b0728aba5c01842e24da3cff04e44be06c6bb655
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.vincent.rsf.server.ai.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.vincent.rsf.server.ai.dto.AiObserveStatsDto;
import com.vincent.rsf.server.ai.entity.AiCallLog;
import com.vincent.rsf.server.ai.entity.AiMcpCallLog;
 
import java.util.List;
 
public interface AiCallLogService extends IService<AiCallLog> {
 
    AiCallLog startCallLog(String requestId, Long sessionId, Long userId, Long tenantId, String promptCode,
                           String promptName, String model, Integer configuredMcpCount,
                           Integer mountedMcpCount, List<String> mountedMcpNames);
 
    void completeCallLog(Long callLogId, String status, Long elapsedMs, Long firstTokenLatencyMs,
                         Integer promptTokens, Integer completionTokens, Integer totalTokens,
                         long toolSuccessCount, long toolFailureCount);
 
    void failCallLog(Long callLogId, String status, String errorCategory, String errorStage, String errorMessage,
                     Long elapsedMs, Long firstTokenLatencyMs, long toolSuccessCount, long toolFailureCount);
 
    void saveMcpCallLog(Long callLogId, String requestId, Long sessionId, String toolCallId, String mountName,
                        String toolName, String status, String inputSummary, String outputSummary,
                        String errorMessage, Long durationMs, Long userId, Long tenantId);
 
    AiObserveStatsDto getObserveStats(Long tenantId);
 
    List<AiMcpCallLog> listMcpLogs(Long callLogId, Long tenantId);
}