aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/fef/i_ranking_assets_repo.h
blob: 227c454e5225d722bac56170eca7276529452367 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/eval/eval/value_cache/constant_value.h>

namespace search::fef {

class OnnxModel;

/**
 * Interface for retrieving named constants, expressions and models from ranking.
 * Empty strings or nullptrs indicates nothing found.
 */
struct IRankingAssetsRepo {
    virtual vespalib::eval::ConstantValue::UP getConstant(const vespalib::string &name) const = 0;
    virtual vespalib::string getExpression(const vespalib::string &name) const = 0;
    virtual const search::fef::OnnxModel *getOnnxModel(const vespalib::string &name) const = 0;
    virtual ~IRankingAssetsRepo() = default;
};

}