Interface PromptMetadata.PromptFilterMetadata

Enclosing interface:
PromptMetadata

public static interface PromptMetadata.PromptFilterMetadata
Abstract Data Type (ADT) modeling filter metadata for all prompts sent during an AI request.
  • Method Details

    • from

      static PromptMetadata.PromptFilterMetadata from(int promptIndex, Object contentFilterMetadata)
      Factory method used to construct a new PromptMetadata.PromptFilterMetadata with the given prompt index and content filter metadata.
      Parameters:
      promptIndex - index of the prompt filter metadata contained in the AI response.
      contentFilterMetadata - underlying AI provider metadata for filtering applied to prompt content.
      Returns:
      a new instance of PromptMetadata.PromptFilterMetadata with the given prompt index and content filter metadata.
    • getPromptIndex

      int getPromptIndex()
      Index of the prompt filter metadata contained in the AI response.
      Returns:
      an index fo the prompt filter metadata contained in the AI response.
    • getContentFilterMetadata

      <T> T getContentFilterMetadata()
      Returns the underlying AI provider metadata for filtering applied to prompt content.
      Type Parameters:
      T - Type used to cast the filtered content metadata into the AI provider-specific type.
      Returns:
      the underlying AI provider metadata for filtering applied to prompt content.