defect-inspection-tools-mcp-server
Version:
Defect inspection tools server handling defect detection, analysis, and reporting with AI/ML capabilities for quality control
45 lines (44 loc) • 1.78 kB
TypeScript
import { ExternalApiService } from '../services/external-api-service.js';
export interface LLMMessage {
role: 'user' | 'assistant' | 'system';
content: string;
}
export interface LLMResponse {
content: string;
usage?: {
promptTokens: number;
completionTokens: number;
totalTokens: number;
};
metadata?: {
model: string;
finishReason: string;
responseTime: number;
};
}
export interface LLMOptions {
temperature?: number;
maxTokens?: number;
topP?: number;
frequencyPenalty?: number;
presencePenalty?: number;
stop?: string[];
stream?: boolean;
}
export declare class LLMService {
private static readonly DEFAULT_OPTIONS;
private openaiService;
private perplexityService;
private cohereService;
constructor(openaiService: ExternalApiService, perplexityService?: ExternalApiService, cohereService?: ExternalApiService);
chatCompletion(messages: LLMMessage[], model?: string, options?: LLMOptions): Promise<LLMResponse>;
perplexityCompletion(messages: LLMMessage[], model?: string, options?: LLMOptions): Promise<LLMResponse>;
cohereCompletion(prompt: string, model?: string, options?: LLMOptions): Promise<LLMResponse>;
analyzeMaritimeDefect(defectData: any, analysisType?: 'severity' | 'root_cause' | 'recommendation' | 'compliance'): Promise<LLMResponse>;
generateComplianceReport(vesselData: any, inspectionData: any, reportType?: 'SIRE' | 'CDI' | 'PSC' | 'TMSA'): Promise<LLMResponse>;
searchAugmentedQuery(query: string, context?: string[]): Promise<LLMResponse>;
private getMaritimeSystemPrompt;
private getComplianceSystemPrompt;
private formatDefectDataForAnalysis;
private formatComplianceDataForReport;
}