Class PicoLLMDialog.Builder

java.lang.Object
ai.picovoice.picollm.PicoLLMDialog.Builder
Direct Known Subclasses:
GemmaChatDialog.Builder, Llama2ChatDialog.Builder, Llama3ChatDialog.Builder, MistralChatDialog.Builder, Phi2Dialog.Builder, Phi35ChatDialog.Builder, Phi3ChatDialog.Builder
Enclosing class:
PicoLLMDialog

public static class PicoLLMDialog.Builder extends Object
Builder class for constructing instances of PicoLLMDialog.
  • Field Details

    • history

      protected Integer history
    • system

      protected String system
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setHistory

      public PicoLLMDialog.Builder setHistory(Integer history)
      Sets the history length for the builder.
      Parameters:
      history - The history length to set. History refers to the number of latest back-and-forths to include in the prompt. Setting history to `null` will embed the entire dialog in the prompt.
      Returns:
      Builder instance.
    • setSystem

      public PicoLLMDialog.Builder setSystem(String system)
      Sets the system instruction for the builder.
      Parameters:
      system - The system instruction to set. System instruction to embed in the prompt for configuring the model's responses.
      Returns:
      Builder instance.
    • build

      public PicoLLMDialog build()
      Builds a new instance of PicoLLMDialog based on the configured settings.
      Returns:
      A new instance of PicoLLMDialog.