Class AiAssessment

java.lang.Object
io.jenkins.plugins.changeinvestigator.ai.AiAssessment
All Implemented Interfaces:
Serializable

public final class AiAssessment extends Object implements Serializable
The AI's interpretation of a BuildInvestigationEvidence bundle. This is always kept as a distinct object from the observed evidence so the UI can never confuse "what Jenkins observed" with "what the model guessed".

Exactly one of three states holds at any time:

  • isDisabled() - AI analysis is turned off in global configuration.
  • isFailed() - AI analysis was attempted but did not succeed; getErrorMessage() explains why. Observed evidence is still shown to the user regardless.
  • otherwise - a real (possibly "insufficient evidence") assessment is present.
See Also:
  • Method Details

    • disabled

      public static AiAssessment disabled()
    • failed

      public static AiAssessment failed(String errorMessage)
    • completed

      public static AiAssessment completed(String mostLikelyCause, Confidence confidence, String reasoning, List<String> supportingEvidence, List<String> recommendedChecks, boolean insufficientEvidence, String providerUsed, String modelUsed)
    • isDisabled

      public boolean isDisabled()
    • isFailed

      public boolean isFailed()
    • isCompleted

      public boolean isCompleted()
    • getErrorMessage

      public String getErrorMessage()
    • getMostLikelyCause

      public String getMostLikelyCause()
    • getConfidence

      public Confidence getConfidence()
    • getConfidenceLabel

      public String getConfidenceLabel()
    • getReasoning

      public String getReasoning()
    • getSupportingEvidence

      public List<String> getSupportingEvidence()
    • getRecommendedChecks

      public List<String> getRecommendedChecks()
    • isInsufficientEvidence

      public boolean isInsufficientEvidence()
    • getProviderUsed

      public String getProviderUsed()
    • getModelUsed

      public String getModelUsed()
    • getGeneratedAtMillis

      public long getGeneratedAtMillis()