1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.dialogflow.cx.v3; 18 19import "google/api/resource.proto"; 20import "google/cloud/dialogflow/cx/v3/safety_settings.proto"; 21 22option cc_enable_arenas = true; 23option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; 24option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; 25option java_multiple_files = true; 26option java_outer_classname = "GenerativeSettingsProto"; 27option java_package = "com.google.cloud.dialogflow.cx.v3"; 28option objc_class_prefix = "DF"; 29option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; 30 31// Settings for Generative AI. 32message GenerativeSettings { 33 option (google.api.resource) = { 34 type: "dialogflow.googleapis.com/AgentGenerativeSettings" 35 pattern: "projects/{project}/locations/{location}/agents/{agent}/generativeSettings" 36 }; 37 38 // Settings for Generative Fallback. 39 message FallbackSettings { 40 // Prompt template. 41 message PromptTemplate { 42 // Prompt name. 43 string display_name = 1; 44 45 // Prompt text that is sent to a LLM on no-match default, placeholders are 46 // filled downstream. For example: "Here is a conversation $conversation, 47 // a response is: " 48 string prompt_text = 2; 49 50 // If the flag is true, the prompt is frozen and cannot be modified by 51 // users. 52 bool frozen = 3; 53 } 54 55 // Display name of the selected prompt. 56 string selected_prompt = 3; 57 58 // Stored prompts that can be selected, for example default templates like 59 // "conservative" or "chatty", or user defined ones. 60 repeated PromptTemplate prompt_templates = 4; 61 } 62 63 // Settings for knowledge connector. These parameters are used for LLM prompt 64 // like "You are <agent>. You are a helpful and verbose <agent_identity> at 65 // <business>, <business_description>. Your task is to help humans on 66 // <agent_scope>". 67 message KnowledgeConnectorSettings { 68 // Name of the company, organization or other entity that the agent 69 // represents. Used for knowledge connector LLM prompt and for knowledge 70 // search. 71 string business = 1; 72 73 // Name of the virtual agent. Used for LLM prompt. Can be left empty. 74 string agent = 2; 75 76 // Identity of the agent, e.g. "virtual agent", "AI assistant". 77 string agent_identity = 3; 78 79 // Company description, used for LLM prompt, e.g. "a family company selling 80 // freshly roasted coffee beans". 81 string business_description = 4; 82 83 // Agent scope, e.g. "Example company website", "internal Example 84 // company website for employees", "manual of car owner". 85 string agent_scope = 5; 86 87 // Whether to disable fallback to Data Store search results (in case the LLM 88 // couldn't pick a proper answer). Per default the feature is enabled. 89 bool disable_data_store_fallback = 8; 90 } 91 92 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 93 // ID>/generativeSettings`. 94 string name = 5; 95 96 // Settings for Generative Fallback. 97 FallbackSettings fallback_settings = 1; 98 99 // Settings for Generative Safety. 100 SafetySettings generative_safety_settings = 3; 101 102 // Settings for knowledge connector. 103 KnowledgeConnectorSettings knowledge_connector_settings = 7; 104 105 // Language for this settings. 106 string language_code = 4; 107} 108