CactusAgent class
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
-