chromium/third_party/blink/renderer/modules/ai/ai_assistant.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 "third_party/blink/renderer/modules/ai/ai_assistant.h"

#include "base/metrics/histogram_functions.h"
#include "base/types/pass_key.h"
#include "third_party/blink/public/mojom/ai/ai_text_session_info.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/ai/ai_text_session_info.mojom-blink.h"
#include "third_party/blink/renderer/modules/ai/ai_metrics.h"
#include "third_party/blink/renderer/modules/ai/exception_helpers.h"
#include "third_party/blink/renderer/modules/ai/model_execution_responder.h"

namespace blink {

AIAssistant::AIAssistant(ExecutionContext* context,
                         AITextSession* text_session,
                         scoped_refptr<base::SequencedTaskRunner> task_runner)
    :{}

void AIAssistant::Trace(Visitor* visitor) const {}

ScriptPromise<IDLString> AIAssistant::prompt(ScriptState* script_state,
                                             const WTF::String& input,
                                             ExceptionState& exception_state) {}

ReadableStream* AIAssistant::promptStreaming(ScriptState* script_state,
                                             const WTF::String& input,
                                             ExceptionState& exception_state) {}

uint64_t AIAssistant::maxTokens() const {}

uint64_t AIAssistant::tokensSoFar() const {}

uint64_t AIAssistant::tokensLeft() const {}

uint32_t AIAssistant::topK() const {}

float AIAssistant::temperature() const {}

ScriptPromise<AIAssistant> AIAssistant::clone(ScriptState* script_state,
                                              ExceptionState& exception_state) {}

// TODO(crbug.com/355967885): reset the remote to destroy the session.
void AIAssistant::destroy(ScriptState* script_state,
                          ExceptionState& exception_state) {}

void AIAssistant::OnResponseComplete(std::optional<uint64_t> current_tokens) {}

}  // namespace blink