Skip to content

Commit 8dc86c1

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add parameters to adjust LLM input and output token limit and temperature in v3beta1 API
feat: add input and output parameters for Flows feat: Return Vertex search document metadata with a datastore response feat: add prompt security settings to the SDK feat: Add generators in fulfillment for v3beta and v3 feat: Add ToolVersion APIs docs: Update environment documentation to add support for ToolVersions feat: add Import/Export playbook functionality to client lib feat: add RestorePlaybookVersion functionality to client lib feat: enable unified tracing API docs: A comment for message `PlaybookInvocation` is changed docs: A comment for message `FlowInvocation` is changed docs: A comment for field `flow` in message `.google.cloud.dialogflow.cx.v3beta1.FlowInvocation` is changed feat: support using secret manager to manage tool/webhook credentials feat: add Event action to Examples feat: add routine and task (existing) playbook types fix!: An existing message `PlaybookInput` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `PlaybookOutput` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `Action` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `UserUtterance` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `AgentUtterance` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `ToolUse` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `PlaybookInvocation` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing message `FlowInvocation` is moved from `google/cloud/dialogflow/cx/v3beta1/example.proto` to `google/cloud/dialogflow/cx/v3beta1/trace.proto` fix!: An existing value `JSON` is removed from enum `DataFormat` PiperOrigin-RevId: 817327474
1 parent bd4166c commit 8dc86c1

17 files changed

+1043
-176
lines changed

google/cloud/dialogflow/cx/v3beta1/BUILD.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ proto_library(
5555
"test_case.proto",
5656
"tool.proto",
5757
"tool_call.proto",
58+
"trace.proto",
5859
"transition_route_group.proto",
5960
"validation_message.proto",
6061
"version.proto",
@@ -198,11 +199,12 @@ load(
198199
"@com_google_googleapis_imports//:imports.bzl",
199200
"go_gapic_assembly_pkg",
200201
"go_gapic_library",
201-
"go_grpc_library",
202+
"go_proto_library",
202203
)
203204

204-
go_grpc_library(
205+
go_proto_library(
205206
name = "cx_go_proto",
207+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
206208
importpath = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb",
207209
protos = [":cx_proto"],
208210
deps = [
@@ -430,6 +432,7 @@ load(
430432

431433
csharp_proto_library(
432434
name = "cx_csharp_proto",
435+
extra_opts = [],
433436
deps = [":cx_proto"],
434437
)
435438

google/cloud/dialogflow/cx/v3beta1/audio_config.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum AudioEncoding {
4242
AUDIO_ENCODING_UNSPECIFIED = 0;
4343

4444
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
45+
// LINT: LEGACY_NAMES
4546
AUDIO_ENCODING_LINEAR_16 = 1;
4647

4748
// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
@@ -310,12 +311,14 @@ enum OutputAudioEncoding {
310311

311312
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
312313
// Audio content returned as LINEAR16 also contains a WAV header.
314+
// LINT: LEGACY_NAMES
313315
OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
314316

315317
// MP3 audio at 32kbps.
316318
OUTPUT_AUDIO_ENCODING_MP3 = 2;
317319

318320
// MP3 audio at 64kbps.
321+
// LINT: LEGACY_NAMES
319322
OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4;
320323

321324
// Opus encoded audio wrapped in an ogg container. The result will be a

google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ syntax = "proto3";
1717
package google.cloud.dialogflow.cx.v3beta1;
1818

1919
import "google/api/field_behavior.proto";
20+
import "google/protobuf/struct.proto";
2021

2122
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
2223
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb";
@@ -72,6 +73,9 @@ message DataStoreConnectionSignals {
7273

7374
// Text included in the prompt.
7475
string text = 3;
76+
77+
// Metadata associated with the document.
78+
google.protobuf.Struct metadata = 5;
7579
}
7680

7781
// Diagnostic info related to the answer generation model call.

google/cloud/dialogflow/cx/v3beta1/dialogflow_grpc_service_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
{
3939
"service": "google.cloud.dialogflow.cx.v3beta1.Intents"
4040
},
41+
{
42+
"service": "google.cloud.dialogflow.cx.v3beta1.Integrations"
43+
},
4144
{
4245
"service": "google.cloud.dialogflow.cx.v3beta1.Pages"
4346
},

google/cloud/dialogflow/cx/v3beta1/environment.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,13 @@ message Environment {
200200

201201
// Configuration for the version.
202202
message VersionConfig {
203-
// Required. Both flow and playbook versions are supported.
203+
// Required. Flow, playbook and tool versions are supported.
204204
// Format for flow version:
205205
// projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
206206
// Format for playbook version:
207207
// projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
208+
// Format for tool version:
209+
// projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>/versions/<VersionID>.
208210
string version = 1 [
209211
(google.api.field_behavior) = REQUIRED,
210212
(google.api.resource_reference) = {

google/cloud/dialogflow/cx/v3beta1/example.proto

Lines changed: 1 addition & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23+
import "google/cloud/dialogflow/cx/v3beta1/trace.proto";
2324
import "google/protobuf/empty.proto";
2425
import "google/protobuf/field_mask.proto";
25-
import "google/protobuf/struct.proto";
2626
import "google/protobuf/timestamp.proto";
2727

2828
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@@ -235,157 +235,3 @@ message Example {
235235
// Note: example's language code is not currently used in dialogflow agents.
236236
string language_code = 13 [(google.api.field_behavior) = OPTIONAL];
237237
}
238-
239-
// Input of the playbook.
240-
message PlaybookInput {
241-
// Optional. Summary string of the preceding conversation for the child
242-
// playbook invocation.
243-
string preceding_conversation_summary = 1
244-
[(google.api.field_behavior) = OPTIONAL];
245-
246-
// Optional. A list of input parameters for the action.
247-
google.protobuf.Struct action_parameters = 3
248-
[(google.api.field_behavior) = OPTIONAL];
249-
}
250-
251-
// Output of the playbook.
252-
message PlaybookOutput {
253-
// Optional. Summary string of the execution result of the child playbook.
254-
string execution_summary = 1 [(google.api.field_behavior) = OPTIONAL];
255-
256-
// Optional. A Struct object of output parameters for the action.
257-
google.protobuf.Struct action_parameters = 4
258-
[(google.api.field_behavior) = OPTIONAL];
259-
}
260-
261-
// Action performed by end user or Dialogflow agent in the conversation.
262-
message Action {
263-
// Action details.
264-
oneof action {
265-
// Optional. Agent obtained a message from the customer.
266-
UserUtterance user_utterance = 1 [(google.api.field_behavior) = OPTIONAL];
267-
268-
// Optional. Action performed by the agent as a message.
269-
AgentUtterance agent_utterance = 2 [(google.api.field_behavior) = OPTIONAL];
270-
271-
// Optional. Action performed on behalf of the agent by calling a plugin
272-
// tool.
273-
ToolUse tool_use = 3 [(google.api.field_behavior) = OPTIONAL];
274-
275-
// Optional. Action performed on behalf of the agent by invoking a child
276-
// playbook.
277-
PlaybookInvocation playbook_invocation = 4
278-
[(google.api.field_behavior) = OPTIONAL];
279-
280-
// Optional. Action performed on behalf of the agent by invoking a CX flow.
281-
FlowInvocation flow_invocation = 5 [(google.api.field_behavior) = OPTIONAL];
282-
}
283-
}
284-
285-
// UserUtterance represents one message sent by the customer.
286-
message UserUtterance {
287-
// Required. Message content in text.
288-
string text = 1 [(google.api.field_behavior) = REQUIRED];
289-
}
290-
291-
// AgentUtterance represents one message sent by the agent.
292-
message AgentUtterance {
293-
// Required. Message content in text.
294-
string text = 1 [(google.api.field_behavior) = REQUIRED];
295-
}
296-
297-
// Stores metadata of the invocation of an action supported by a tool.
298-
message ToolUse {
299-
// Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
300-
// be used. Format:
301-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
302-
string tool = 1 [
303-
(google.api.field_behavior) = REQUIRED,
304-
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" }
305-
];
306-
307-
// Output only. The display name of the tool.
308-
string display_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
309-
310-
// Optional. Name of the action to be called during the tool use.
311-
string action = 2 [(google.api.field_behavior) = OPTIONAL];
312-
313-
// Optional. A list of input parameters for the action.
314-
google.protobuf.Struct input_action_parameters = 5
315-
[(google.api.field_behavior) = OPTIONAL];
316-
317-
// Optional. A list of output parameters generated by the action.
318-
google.protobuf.Struct output_action_parameters = 6
319-
[(google.api.field_behavior) = OPTIONAL];
320-
}
321-
322-
// Stores metadata of the invocation of a child playbook.
323-
message PlaybookInvocation {
324-
// Required. The unique identifier of the playbook.
325-
// Format:
326-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
327-
string playbook = 1 [
328-
(google.api.field_behavior) = REQUIRED,
329-
(google.api.resource_reference) = {
330-
type: "dialogflow.googleapis.com/Playbook"
331-
}
332-
];
333-
334-
// Output only. The display name of the playbook.
335-
string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
336-
337-
// Optional. Input of the child playbook invocation.
338-
PlaybookInput playbook_input = 2 [(google.api.field_behavior) = OPTIONAL];
339-
340-
// Optional. Output of the child playbook invocation.
341-
PlaybookOutput playbook_output = 3 [(google.api.field_behavior) = OPTIONAL];
342-
343-
// Required. Playbook invocation's output state.
344-
OutputState playbook_state = 4 [(google.api.field_behavior) = REQUIRED];
345-
}
346-
347-
// Stores metadata of the invocation of a CX flow.
348-
message FlowInvocation {
349-
// Required. The unique identifier of the flow.
350-
// Format:
351-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
352-
string flow = 1 [
353-
(google.api.field_behavior) = REQUIRED,
354-
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
355-
];
356-
357-
// Output only. The display name of the flow.
358-
string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
359-
360-
// Optional. A list of input parameters for the flow.
361-
google.protobuf.Struct input_action_parameters = 5
362-
[(google.api.field_behavior) = OPTIONAL];
363-
364-
// Optional. A list of output parameters generated by the flow invocation.
365-
google.protobuf.Struct output_action_parameters = 6
366-
[(google.api.field_behavior) = OPTIONAL];
367-
368-
// Required. Flow invocation's output state.
369-
OutputState flow_state = 4 [(google.api.field_behavior) = REQUIRED];
370-
}
371-
372-
// Output state.
373-
enum OutputState {
374-
// Unspecified output.
375-
OUTPUT_STATE_UNSPECIFIED = 0;
376-
377-
// Succeeded.
378-
OUTPUT_STATE_OK = 1;
379-
380-
// Cancelled.
381-
OUTPUT_STATE_CANCELLED = 2;
382-
383-
// Failed.
384-
OUTPUT_STATE_FAILED = 3;
385-
386-
// Escalated.
387-
OUTPUT_STATE_ESCALATED = 4;
388-
389-
// Pending.
390-
OUTPUT_STATE_PENDING = 5;
391-
}

google/cloud/dialogflow/cx/v3beta1/flow.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto";
2424
import "google/cloud/dialogflow/cx/v3beta1/import_strategy.proto";
2525
import "google/cloud/dialogflow/cx/v3beta1/page.proto";
26+
import "google/cloud/dialogflow/cx/v3beta1/parameter_definition.proto";
2627
import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto";
2728
import "google/longrunning/operations.proto";
2829
import "google/protobuf/empty.proto";
@@ -349,6 +350,14 @@ message Flow {
349350
KnowledgeConnectorSettings knowledge_connector_settings = 18
350351
[(google.api.field_behavior) = OPTIONAL];
351352

353+
// Optional. Defined structured input parameters for this flow.
354+
repeated ParameterDefinition input_parameter_definitions = 26
355+
[(google.api.field_behavior) = OPTIONAL];
356+
357+
// Optional. Defined structured output parameters for this flow.
358+
repeated ParameterDefinition output_parameter_definitions = 27
359+
[(google.api.field_behavior) = OPTIONAL];
360+
352361
// Optional. Multi-lingual agent settings for this flow.
353362
MultiLanguageSettings multi_language_settings = 28
354363
[(google.api.field_behavior) = OPTIONAL];

google/cloud/dialogflow/cx/v3beta1/fulfillment.proto

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package google.cloud.dialogflow.cx.v3beta1;
1818

19+
import "google/api/field_behavior.proto";
1920
import "google/api/resource.proto";
2021
import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto";
2122
import "google/cloud/dialogflow/cx/v3beta1/response_message.proto";
@@ -91,6 +92,34 @@ message Fulfillment {
9192
repeated Case cases = 1;
9293
}
9394

95+
// Generator settings used by the LLM to generate a text response.
96+
message GeneratorSettings {
97+
// Required. The generator to call.
98+
// Format:
99+
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>`.
100+
string generator = 1 [
101+
(google.api.field_behavior) = REQUIRED,
102+
(google.api.resource_reference) = {
103+
type: "dialogflow.googleapis.com/Generator"
104+
}
105+
];
106+
107+
// Map from [placeholder parameter][Generator.Parameter.id] in the
108+
// [Generator][google.cloud.dialogflow.cx.v3beta1.Generator] to
109+
// corresponding session parameters. By default, Dialogflow uses the session
110+
// parameter with the same name to fill in the generator template. e.g. If
111+
// there is a placeholder parameter `city` in the Generator, Dialogflow
112+
// default to fill in the `$city` with
113+
// `$session.params.city`. However, you may choose to fill `$city` with
114+
// `$session.params.desination-city`.
115+
// - Map key: [parameter ID][Genrator.Parameter.id]
116+
// - Map value: session parameter name
117+
map<string, string> input_parameters = 2;
118+
119+
// Required. Output parameter which should contain the generator response.
120+
string output_parameter = 3 [(google.api.field_behavior) = REQUIRED];
121+
}
122+
94123
// The list of rich message responses to present to the user.
95124
repeated ResponseMessage messages = 1;
96125

@@ -137,4 +166,7 @@ message Fulfillment {
137166
// fulfillment will be respected. This flag is only useful for fulfillments
138167
// associated with no-match event handlers.
139168
bool enable_generative_fallback = 12;
169+
170+
// A list of Generators to be called during this fulfillment.
171+
repeated GeneratorSettings generators = 13;
140172
}

0 commit comments

Comments
 (0)