googleapis/google/cloud/ces/v1beta/fakes.proto
Google APIs 3a4f028294 feat: add public libraries for CES v1beta
PiperOrigin-RevId: 872569929
2026-02-19 14:36:52 -08:00

62 lines
2.2 KiB
Protocol Buffer

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.ces.v1beta;
import "google/api/field_behavior.proto";
option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb";
option java_multiple_files = true;
option java_outer_classname = "FakesProto";
option java_package = "com.google.cloud.ces.v1beta";
// Configures the tool call behaviour for evaluation runs.
enum EvaluationToolCallBehaviour {
// Unspecified tool call behavior. Will default to real tool calls.
EVALUATION_TOOL_CALL_BEHAVIOUR_UNSPECIFIED = 0;
// Use real tool calls.
REAL = 1;
// Use fake tool calls.
FAKE = 2;
}
// A code block to be executed instead of a real tool call.
message CodeBlock {
// Required. Python code which will be invoked in tool fake mode.
// Expected Python function signature -
// To catch all tool calls:
// def fake_tool_call(tool: Tool, input: dict[str, Any],
// callback_context: CallbackContext) -> Optional[dict[str, Any]]:
// To catch a specific tool call:
// def fake_{tool_id}(tool: Tool, input: dict[str, Any],
// callback_context: CallbackContext) -> Optional[dict[str, Any]]:
// If the function returns None, the real tool will be invoked instead.
string python_code = 1 [(google.api.field_behavior) = REQUIRED];
}
// Configuration for tool behavior in fake mode.
message ToolFakeConfig {
// The response is either static or it is provided by a python function.
oneof tool_response {
// Optional. Code block which will be executed instead of a real tool call.
CodeBlock code_block = 1 [(google.api.field_behavior) = OPTIONAL];
}
// Optional. Whether the tool is using fake mode.
bool enable_fake_mode = 2 [(google.api.field_behavior) = OPTIONAL];
}