MNN/apps/iOS/MNNLLMChat/MNNLLMiOS/LLMWrapper/LLMInferenceEngineWrapper.h

34 lines
777 B
C
Raw Normal View History

//
// LLMInferenceEngineWrapper.h
// mnn-llm
//
// Created by wangzhaode on 2023/12/14.
//
#ifndef LLMInferenceEngineWrapper_h
#define LLMInferenceEngineWrapper_h
// LLMInferenceEngineWrapper.h
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^CompletionHandler)(BOOL success);
typedef void (^OutputHandler)(NSString * _Nonnull output);
@interface LLMInferenceEngineWrapper : NSObject
- (instancetype)initWithModelPath:(NSString *)modelPath completion:(CompletionHandler)completion;
- (void)processInput:(NSString *)input withOutput:(OutputHandler)output;
- (void)addPromptsFromArray:(NSArray<NSDictionary *> *)array;
2025-03-19 17:03:51 +08:00
- (void)setConfigWithJSONString:(NSString *)jsonStr;
@end
NS_ASSUME_NONNULL_END
#endif /* LLMInferenceEngineWrapper_h */