chromium/components/history_embeddings/ml_answerer.cc

// 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.

#include "components/history_embeddings/ml_answerer.h"

#include "base/barrier_callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/stringprintf.h"
#include "components/history_embeddings/history_embeddings_features.h"
#include "components/optimization_guide/core/optimization_guide_model_executor.h"
#include "components/optimization_guide/core/optimization_guide_util.h"
#include "components/optimization_guide/proto/features/history_answer.pb.h"

namespace history_embeddings {

ModelExecutionError;
Session;
OptimizationGuideModelExecutionError;
OptimizationGuideModelStreamingExecutionResult;
Answer;
HistoryAnswerRequest;
Passage;

namespace {

static constexpr std::string kPassageIdToken =;

std::string GetPassageIdStr(size_t id) {}

float GetMlAnswerScoreThreshold() {}

void AddQueryAndPassagesToSession(const std::string& query,
                                  const std::vector<std::string>& passages,
                                  Session* session) {}

}  // namespace

// Manages sessions for generating an answer for a given query and multiple
// URLs.
class MlAnswerer::SessionManager {};

MlAnswerer::MlAnswerer(OptimizationGuideModelExecutor* model_executor)
    :{}

MlAnswerer::~MlAnswerer() = default;

void MlAnswerer::ComputeAnswer(std::string query,
                               Context context,
                               ComputeAnswerCallback callback) {}

}  // namespace history_embeddings