chromium/services/on_device_model/on_device_model_service.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/on_device_model/on_device_model_service.h"

#include <queue>
#include <vector>

#include "base/metrics/histogram_functions.h"
#include "base/not_fatal_until.h"
#include "base/timer/elapsed_timer.h"
#include "base/uuid.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "services/on_device_model/ml/on_device_model_executor.h"
#include "services/on_device_model/ml/on_device_model_internal.h"

#if !defined(ENABLE_ML_INTERNAL)
#include "services/on_device_model/fake/on_device_model_fake.h"  //nogncheck
#endif

namespace on_device_model {
namespace {

class ModelWrapper;

class SessionWrapper final : public mojom::Session {};

class ModelWrapper final : public mojom::OnDeviceModel {};

void SessionWrapper::AddContext(
    mojom::InputOptionsPtr input,
    mojo::PendingRemote<mojom::ContextClient> client) {}

void SessionWrapper::Execute(
    mojom::InputOptionsPtr input,
    mojo::PendingRemote<mojom::StreamingResponder> response) {}

void SessionWrapper::GetSizeInTokens(const std::string& text,
                                     GetSizeInTokensCallback callback) {}

void SessionWrapper::Score(const std::string& text, ScoreCallback callback) {}

void SessionWrapper::Clone(mojo::PendingReceiver<mojom::Session> session) {}

void SessionWrapper::CloneInternal(
    mojo::PendingReceiver<mojom::Session> session) {}

const ml::OnDeviceModelInternalImpl* DefaultImpl() {}

}  // namespace

OnDeviceModelService::OnDeviceModelService(
    mojo::PendingReceiver<mojom::OnDeviceModelService> receiver)
    :{}

OnDeviceModelService::OnDeviceModelService(
    mojo::PendingReceiver<mojom::OnDeviceModelService> receiver,
    const ml::OnDeviceModelInternalImpl* impl)
    :{}

OnDeviceModelService::~OnDeviceModelService() = default;

void OnDeviceModelService::LoadModel(
    mojom::LoadModelParamsPtr params,
    mojo::PendingReceiver<mojom::OnDeviceModel> model,
    LoadModelCallback callback) {}

void OnDeviceModelService::GetEstimatedPerformanceClass(
    GetEstimatedPerformanceClassCallback callback) {}

void OnDeviceModelService::DeleteModel(
    base::WeakPtr<mojom::OnDeviceModel> model) {}

}  // namespace on_device_model