MNN/apps/iOS/MNNLLMChat/MNNLLMiOS/Chat/Models/LLMState.swift

26 lines
582 B
Swift

//
// LLMState.swift
// MNNLLMiOS
//
// Created by () on 2025/1/15.
//
import ExyteChat
import ExyteMediaPicker
actor LLMState {
private var isProcessing: Bool = false
func setProcessing(_ value: Bool) {
isProcessing = value
}
func getProcessing() -> Bool {
return isProcessing
}
func processContent(_ content: String, llm: LLMInferenceEngineWrapper?, showPerformance: Bool, completion: @escaping (String) -> Void) {
llm?.processInput(content, withOutput: completion, showPerformance: true)
}
}