#include "third_party/blink/renderer/modules/ai/ai_summarizer.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ai_summarizer.h"
#include "third_party/blink/renderer/modules/ai/ai_metrics.h"
#include "third_party/blink/renderer/modules/ai/ai_text_session.h"
#include "third_party/blink/renderer/modules/ai/exception_helpers.h"
#include "third_party/blink/renderer/modules/ai/model_execution_responder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
AISummarizer::AISummarizer(
ExecutionContext* context,
scoped_refptr<base::SequencedTaskRunner> task_runner,
mojo::PendingRemote<mojom::blink::AISummarizer> pending_remote,
const WTF::String& shared_context,
V8AISummarizerType type,
V8AISummarizerFormat format,
V8AISummarizerLength length)
: … { … }
void AISummarizer::Trace(Visitor* visitor) const { … }
ScriptPromise<IDLString> AISummarizer::summarize(
ScriptState* script_state,
const WTF::String& input,
const AISummarizerSummarizeOptions* options,
ExceptionState& exception_state) { … }
ReadableStream* AISummarizer::summarizeStreaming(
ScriptState* script_state,
const WTF::String& input,
const AISummarizerSummarizeOptions* options,
ExceptionState& exception_state) { … }
void AISummarizer::destroy(ScriptState* script_state,
ExceptionState& exception_state) { … }
}