• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License a
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef I_AIP_CORE_MANAGER_IMPL_H
17 #define I_AIP_CORE_MANAGER_IMPL_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "i_aip_core_manager.h"
23 
24 namespace OHOS {
25 namespace DataIntelligence {
26 class IAipCoreManagerImpl : public IAipCoreManager {
27 public:
28     IAipCoreManagerImpl() = default;
29     ~IAipCoreManagerImpl() = default;
30     int32_t InitTextModel(const ModelConfigData &config) override;
31     int32_t InitImageModel(const ModelConfigData &config) override;
32     int32_t LoadTextModel() override;
33     int32_t ReleaseTextModel() override;
34     int32_t GetTextEmbedding(std::string file, std::vector<float> &results) override;
35     int32_t GetTextEmbedding(const std::vector<std::string> &files, std::vector<std::vector<float>> &results) override;
36     int32_t LoadImageModel() override;
37     int32_t ReleaseImageModel() override;
38     int32_t GetImageEmbedding(std::string uri, std::vector<float> &results) override;
39     int32_t SplitText(std::string text, int32_t size, float overlap, std::vector<std::string> &results) override;
40     bool CheckDeviceType() override;
41 };
42 } // namespace DataIntelligence
43 } // namespace OHOS
44 #endif // I_AIP_CORE_MANAGER_IMPL_H
45