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

edition = "2023";

package optimization_guide.proto;

import "components/optimization_guide/proto/features/common_quality_data.proto";

import "components/optimization_guide/proto/model_quality_metadata.proto";

option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.optimization_guide.features.proto";

option java_outer_classname = "BlingPrototypingProto";

// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please refer to
// http://go/chrome-mqls-onboarding (Google-internal link), and then changes will
// be synced with Chrome automatically.

// Next ID: 5
message BlingPrototypingLoggingData {
  // The feature request.
  BlingPrototypingRequest request = 1 [features = { field_presence: EXPLICIT }];

  // The feature response.
  BlingPrototypingResponse response = 2 [features = { field_presence: EXPLICIT }];

  // Internal logging information from the model execution.
  ModelExecutionInfo model_execution_info = 3 [features = { field_presence: EXPLICIT }];

  // Optional metadata about the data.
  BlingPrototypingMetadata metadata = 4 [features = { field_presence: EXPLICIT }];
}

// The request to execute a prototyping prompt in Bling.
// Next ID: 7
message BlingPrototypingRequest {
  // The prompt to pass to the model.
  string query = 2 [features = { field_presence: IMPLICIT }];

  // The page context of the current tab.
  PageContext page_context = 3 [features = { field_presence: EXPLICIT }];

  // The system instructions to pass to the model.
  string system_instructions = 4 [features = { field_presence: IMPLICIT }];

  // The temperature to pass to the model.
  float temperature = 5 [features = { field_presence: IMPLICIT }];

  // The model to use. Default is MODEL_ENUM_EVERGREEN_GEMINI_V3P1_S.
  ModelEnum model_enum = 6 [features = { field_presence: IMPLICIT }];

  enum ModelEnum {
    MODEL_ENUM_UNSPECIFIED = 0;

    MODEL_ENUM_EVERGREEN_GEMINI_V3 = 5;

    MODEL_ENUM_EVERGREEN_GEMINI_NANO_V2_MULTI_MODAL = 6;

    MODEL_ENUM_EVERGREEN_GEMINI_V3_XS = 7;

    MODEL_ENUM_EVERGREEN_GEMINI_V4_S = 8;

    MODEL_ENUM_EVERGREEN_GEMINI_V4_XS = 9;

    MODEL_ENUM_EVERGREEN_GEMINI_V3P1_S = 10;

    reserved 1, 2, 3, 4;
  }

  reserved 1;
}

// The response from executing a prototyping prompt in Bling.
// Next ID: 2
message BlingPrototypingResponse {
  // The model's output.
  string output = 1 [features = { field_presence: IMPLICIT }];
}

// Additional information about the evaluation/prototyping session.
// Next ID: 3
message BlingPrototypingMetadata {
  // An optional tag to use for querying the record from MQLS logs.
  string logging_tag = 1 [features = { field_presence: IMPLICIT }];

  // An optional description to provide more context about the data uploaded by
  // the user.
  string logging_description = 2 [features = { field_presence: IMPLICIT }];
}
