#include "components/history_embeddings/passage_embeddings_service_controller.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/thread_pool.h"
#include "components/history_embeddings/embedder.h"
#include "components/history_embeddings/history_embeddings_features.h"
#include "components/history_embeddings/vector_database.h"
#include "components/optimization_guide/core/optimization_guide_util.h"
namespace {
passage_embeddings::mojom::PassageEmbeddingsLoadModelsParamsPtr MakeModelParams(
const base::FilePath& embeddings_path,
const base::FilePath& sp_path,
uint32_t input_window_size) { … }
class ScopedEmbeddingsModelInfoStatusLogger { … };
}
namespace history_embeddings {
PassageEmbeddingsServiceController::PassageEmbeddingsServiceController() =
default;
PassageEmbeddingsServiceController::~PassageEmbeddingsServiceController() =
default;
bool PassageEmbeddingsServiceController::MaybeUpdateModelPaths(
base::optional_ref<const optimization_guide::ModelInfo> model_info) { … }
void PassageEmbeddingsServiceController::LoadModelsToService(
mojo::PendingReceiver<passage_embeddings::mojom::PassageEmbedder> model,
passage_embeddings::mojom::PassageEmbeddingsLoadModelsParamsPtr params) { … }
void PassageEmbeddingsServiceController::OnLoadModelsResult(bool success) { … }
EmbedderMetadata PassageEmbeddingsServiceController::GetEmbedderMetadata() { … }
void PassageEmbeddingsServiceController::GetEmbeddings(
std::vector<std::string> passages,
passage_embeddings::mojom::PassagePriority priority,
GetEmbeddingsCallback callback) { … }
bool PassageEmbeddingsServiceController::EmbedderReady() { … }
void PassageEmbeddingsServiceController::ResetRemotes() { … }
void PassageEmbeddingsServiceController::OnDisconnected() { … }
}