chromium/components/history_embeddings/scheduling_embedder.h

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

#ifndef COMPONENTS_HISTORY_EMBEDDINGS_SCHEDULING_EMBEDDER_H_
#define COMPONENTS_HISTORY_EMBEDDINGS_SCHEDULING_EMBEDDER_H_

#include <memory>
#include <optional>
#include <queue>
#include <string>
#include <vector>

#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "components/history_embeddings/embedder.h"

namespace history_embeddings {

// The SchedulingEmbedder wraps another primary embedder and adds scheduling
// control with batching and priorities so that high priority queries can be
// computed as soon as possible. Scheduling is also needed to avoid clogging the
// pipes for a slow remote embedder. Even single pages can take a while, and
// when the model changes, all existing passages need their embeddings
// recomputed, which can take a very long time and should be done at lower
// priority.
class SchedulingEmbedder : public Embedder {};

}  // namespace history_embeddings

#endif  // COMPONENTS_HISTORY_EMBEDDINGS_SCHEDULING_EMBEDDER_H_