chromium/third_party/blink/public/mojom/ai/ai_text_session_info.mojom

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

module blink.mojom;

// This struct contains the parameters that control the sampling behavior of
// the model execution behind the session.
struct AITextSessionSamplingParams {
  uint32 top_k;
  float temperature;
};

// This struct contains the information describing the default and max values
// for session creation.
// TODO(crbug.com/355967885): move to the ai_assistant_factory.
struct AITextModelInfo {
  uint32 default_top_k;
  uint32 max_top_k;
  float default_temperature;
};

// The information of an AITextSession, this should be returned from any method
// that creates a new AITextSession.
struct AITextSessionInfo {
  uint64 max_tokens;

  AITextSessionSamplingParams sampling_params;
};