Jazz 1.26.+
Loading...
Searching...
No Matches
models_api.h
1/* Jazz (c) 2018-2026 kaalam.ai (The Authors of Jazz), using (under the same license):
2
3 1. Biomodelling - The AATBlockQueue class (c) Jacques BasaldĂșa, 2009-2012 licensed
4 exclusively for the use in the Jazz server software.
5
6 Copyright 2009-2012 Jacques BasaldĂșa
7
8 2. BBVA - Jazz: A lightweight analytical web server for data-driven applications.
9
10 Copyright 2016-2017 Banco Bilbao Vizcaya Argentaria, S.A.
11
12 This product includes software developed at
13
14 BBVA (https://www.bbva.com/)
15
16 3. LMDB, Copyright 2011-2017 Howard Chu, Symas Corp. All rights reserved.
17
18 Licensed under http://www.OpenLDAP.org/license.html
19
20
21 Licensed under the Apache License, Version 2.0 (the "License");
22 you may not use this file except in compliance with the License.
23 You may obtain a copy of the License at
24
25 http://www.apache.org/licenses/LICENSE-2.0
26
27 Unless required by applicable law or agreed to in writing, software
28 distributed under the License is distributed on an "AS IS" BASIS,
29 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 See the License for the specific language governing permissions and
31 limitations under the License.
32*/
33
34
35#include "src/jazz_models/model.h"
36
37#if defined CATCH_TEST
38#ifndef INCLUDED_JAZZ_CATCH2
39#define INCLUDED_JAZZ_CATCH2
40
41#include "src/catch2/catch.hpp"
42
43#endif
44#endif
45
46
47#ifndef INCLUDED_JAZZ_MODELS_MODELS_API
48#define INCLUDED_JAZZ_MODELS_MODELS_API
49
50
54namespace jazz_models
55{
56
61class ModelsAPI : public BaseAPI {
62
63//TODO: Synchronize http://localhost:8888/jazz_reference/api_ref_model.html#models-in-modelsapi (Erase this only when Core is done.)
64
65 public:
66
67 ModelsAPI(pLogger a_logger,
68 pConfigFile a_config,
69 pChannels a_channels,
70 pVolatile a_volatile,
71 pPersisted a_persisted,
72 pCore a_core,
73 pBebop a_bebop);
74 ~ModelsAPI();
75
76 virtual pChar const id();
77
80
81 virtual void base_names(BaseNames &base_names);
82
83 // API Container interface
84
85 virtual StatusCode get (pTransaction &p_txn,
86 ApiQueryState &what);
87
88#ifndef CATCH_TEST
89 private:
90#endif
91
94};
96
97
98#ifdef CATCH_TEST
99
100// Instancing ModelsAPI
101// --------------------
102
103extern ModelsAPI MDL;
104
105#endif
106
107} // namespace jazz_models
108
109#endif // ifndef INCLUDED_JAZZ_MODELS_MODELS_API
Bebop: The compiler.
Definition bebop.h:91
BaseAPI: The parent of API and Core.
Definition base_api.h:122
Core: The execution unit is now a wrapper around onnx-runtime.
Definition core.h:89
Channels: A Container doing block transactions across media (files, folders, shell,...
Definition channel.h:244
A configuration file as a key/value store.
Definition utils.h:218
A simple logger.
Definition utils.h:248
Persisted: A Service to manage data objects in LMDB.
Definition persisted.h:111
Volatile: A Service to manage data objects in RAM.
Definition volatile.h:243
ModelsAPI: The model API.
Definition models_api.h:61
virtual void base_names(BaseNames &base_names)
Definition models_api.cpp:120
StatusCode start()
Definition models_api.cpp:89
virtual StatusCode get(pTransaction &p_txn, ApiQueryState &what)
Definition models_api.cpp:145
pCore p_core
A pointer to the Core container.
Definition models_api.h:92
StatusCode shut_down()
Definition models_api.cpp:107
pBebop p_bebop
A pointer to the Bebop compiler.
Definition models_api.h:93
virtual pChar const id()
Definition models_api.cpp:79
std::map< String, pContainer > BaseNames
A map of names for the containers (or structure engines like "map" or "tree" inside Volatile).
Definition container.h:166
char * pChar
A pointer to a char buffer.
Definition types.h:189
int StatusCode
Type returned by the Service API.
Definition utils.h:142
Concepts: A tree of Snippets with support fro blending that populates a semantic space.
Definition concept.cpp:39
ModelsAPI * pModelsAPI
A pointer to a ModelsAPI.
Definition models_api.h:95
A buffer to keep the state while parsing/executing a query.
Definition base_api.h:99
Transaction: A wrapper over a Block that defines the communication of a block with a Container.
Definition container.h:176