Package ai.picovoice.picollm
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 java.lang.ObjectBuilder class for constructing instances of PicoLLMDialog.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PicoLLMDialogbuild()Builds a new instance of PicoLLMDialog based on the configured settings.PicoLLMDialog.BuildersetHistory(java.lang.Integer history)Sets the history length for the builder.PicoLLMDialog.BuildersetSystem(java.lang.String system)Sets the system instruction for the builder.
-
-
-
Method Detail
-
setHistory
public PicoLLMDialog.Builder setHistory(java.lang.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(java.lang.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.
-
-