CactusAgent class

Constructors

CactusAgent({int threads = 4, int contextSize = 2048, int batchSize = 512, int gpuLayers = 0})

Properties

batchSize int
final
contextSize int
final
gpuLayers int
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
threads int
final

Methods

addTool(String name, ToolExecutor function, String description, Map<String, Parameter> parameters) → void
completion(List<ChatMessage> messages, {int maxTokens = 256, double? temperature, int? topK, double? topP, List<String>? stopSequences, CactusTokenCallback? onToken}) Future<CactusCompletionResult>
completionWithTools(List<ChatMessage> messages, {int maxTokens = 256, double? temperature, int? topK, double? topP, List<String>? stopSequences, CactusTokenCallback? onToken}) Future<CompletionResult>
download({required String modelUrl, String? modelFilename, CactusProgressCallback? onProgress}) Future<bool>
init({String? modelFilename, String? chatTemplate, int contextSize = 2048, int gpuLayers = 0, int threads = 4, bool generateEmbeddings = false, CactusProgressCallback? onProgress, String? cactusToken}) Future<bool>
isLoaded() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unload() → void

Operators

operator ==(Object other) bool
The equality operator.
inherited