Package ai.picovoice.picollm
Class PicoLLMCompletion
- java.lang.Object
-
- ai.picovoice.picollm.PicoLLMCompletion
-
public class PicoLLMCompletion extends java.lang.ObjectRepresents a picoLLM completion result.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPicoLLMCompletion.CompletionTokenRepresents a generated token within completion and top alternative tokens.static classPicoLLMCompletion.EndpointRepresents reasons for ending the generation process.static classPicoLLMCompletion.TokenRepresents a generated token.static classPicoLLMCompletion.UsageRepresents usage information.
-
Constructor Summary
Constructors Constructor Description PicoLLMCompletion(PicoLLMCompletion.Usage usage, PicoLLMCompletion.Endpoint endpoint, PicoLLMCompletion.CompletionToken[] completionTokens, java.lang.String completion)Constructor for the PicoLLMCompletion class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCompletion()Getter for the completion string.PicoLLMCompletion.CompletionToken[]getCompletionTokens()Getter for the generated tokens within completion and top alternative tokens.PicoLLMCompletion.EndpointgetEndpoint()Getter for the reason for ending the generation process.PicoLLMCompletion.UsagegetUsage()Getter for usage information.
-
-
-
Constructor Detail
-
PicoLLMCompletion
public PicoLLMCompletion(PicoLLMCompletion.Usage usage, PicoLLMCompletion.Endpoint endpoint, PicoLLMCompletion.CompletionToken[] completionTokens, java.lang.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 Detail
-
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 java.lang.String getCompletion()
Getter for the completion string.- Returns:
- The completion string.
-
-