Class PicoLLMCompletion

java.lang.Object
ai.picovoice.picollm.PicoLLMCompletion

public class PicoLLMCompletion extends Object
Represents a picoLLM completion result.
  • Constructor Details

    • PicoLLMCompletion

      public PicoLLMCompletion(PicoLLMCompletion.Usage usage, PicoLLMCompletion.Endpoint endpoint, PicoLLMCompletion.CompletionToken[] completionTokens, String completion)
      Constructor for the PicoLLMCompletion class.
      Parameters:
      usage - Usage information.
      endpoint - Reason for ending the generation process.
      completionTokens - Generated tokens within completion and top alternative tokens.
      completion - Completion string.
  • Method Details

    • getUsage

      public PicoLLMCompletion.Usage getUsage()
      Getter for usage information.
      Returns:
      The usage information.
    • getEndpoint

      public PicoLLMCompletion.Endpoint getEndpoint()
      Getter for the reason for ending the generation process.
      Returns:
      The reason for ending the generation process.
    • getCompletionTokens

      public PicoLLMCompletion.CompletionToken[] getCompletionTokens()
      Getter for the generated tokens within completion and top alternative tokens.
      Returns:
      The generated tokens within completion and top alternative tokens.
    • getCompletion

      public String getCompletion()
      Getter for the completion string.
      Returns:
      The completion string.