Package ai.picovoice.picollm
Class Phi2Dialog
java.lang.Object
ai.picovoice.picollm.PicoLLMDialog
ai.picovoice.picollm.Phi2Dialog
- Direct Known Subclasses:
Phi2ChatDialog,Phi2QADialog
Represents a dialog helper for the 'phi-2' model within PicoLLM.
This is a base class that provides functionalities common to both 'chat' and 'qa' modes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classBuilder class for constructing Phi2Dialog instances. -
Field Summary
Fields inherited from class ai.picovoice.picollm.PicoLLMDialog
history, humanRequests, llmResponses, system -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPhi2Dialog(String humanTag, String llmTag, Integer history, String system) Constructs a Phi2Dialog instance with the specified history, system, human tag, and LLM tag. -
Method Summary
Methods inherited from class ai.picovoice.picollm.PicoLLMDialog
addHumanRequest, addLLMResponse
-
Constructor Details
-
Phi2Dialog
Constructs a Phi2Dialog instance with the specified history, system, human tag, and LLM tag.- Parameters:
humanTag- The tag representing human input.llmTag- The tag representing LLM output.history- The history length for the dialog.system- The system instruction for configuring the model's responses.
-
-
Method Details
-
getPrompt
Generates a prompt string based on the human requests and LLM responses.- Overrides:
getPromptin classPicoLLMDialog- Returns:
- The formatted prompt string.
- Throws:
PicoLLMException- If there is an issue generating the prompt.
-