Skip to content

Commit d0b40ac

Browse files
1 parent 7c7956e commit d0b40ac

9 files changed

+480
-5
lines changed

src/CustomerEngagementSuite/AgentTool.php

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919

2020
class AgentTool extends \Google\Model
2121
{
22+
/**
23+
* Optional. The resource name of the agent that is the entry point of the
24+
* tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
25+
*
26+
* @var string
27+
*/
28+
public $agent;
2229
/**
2330
* Optional. Description of the tool's purpose.
2431
*
@@ -32,13 +39,32 @@ class AgentTool extends \Google\Model
3239
*/
3340
public $name;
3441
/**
35-
* Optional. The resource name of the root agent that is the entry point of
36-
* the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
42+
* Optional. Deprecated: Use `agent` instead. The resource name of the root
43+
* agent that is the entry point of the tool. Format:
44+
* `projects/{project}/locations/{location}/agents/{agent}`
3745
*
46+
* @deprecated
3847
* @var string
3948
*/
4049
public $rootAgent;
4150

51+
/**
52+
* Optional. The resource name of the agent that is the entry point of the
53+
* tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
54+
*
55+
* @param string $agent
56+
*/
57+
public function setAgent($agent)
58+
{
59+
$this->agent = $agent;
60+
}
61+
/**
62+
* @return string
63+
*/
64+
public function getAgent()
65+
{
66+
return $this->agent;
67+
}
4268
/**
4369
* Optional. Description of the tool's purpose.
4470
*
@@ -72,16 +98,19 @@ public function getName()
7298
return $this->name;
7399
}
74100
/**
75-
* Optional. The resource name of the root agent that is the entry point of
76-
* the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
101+
* Optional. Deprecated: Use `agent` instead. The resource name of the root
102+
* agent that is the entry point of the tool. Format:
103+
* `projects/{project}/locations/{location}/agents/{agent}`
77104
*
105+
* @deprecated
78106
* @param string $rootAgent
79107
*/
80108
public function setRootAgent($rootAgent)
81109
{
82110
$this->rootAgent = $rootAgent;
83111
}
84112
/**
113+
* @deprecated
85114
* @return string
86115
*/
87116
public function getRootAgent()

src/CustomerEngagementSuite/Conversation.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ class Conversation extends \Google\Collection
5454
* The conversation is from the evaluation.
5555
*/
5656
public const SOURCE_EVAL = 'EVAL';
57+
/**
58+
* The conversation is from an agent tool. Agent tool runs the agent in a
59+
* separate session, which is persisted for testing and debugging purposes.
60+
*/
61+
public const SOURCE_AGENT_TOOL = 'AGENT_TOOL';
5762
protected $collection_key = 'turns';
5863
/**
5964
* Output only. The version of the app used for processing the conversation.
@@ -294,7 +299,7 @@ public function getName()
294299
/**
295300
* Output only. Indicate the source of the conversation.
296301
*
297-
* Accepted values: SOURCE_UNSPECIFIED, LIVE, SIMULATOR, EVAL
302+
* Accepted values: SOURCE_UNSPECIFIED, LIVE, SIMULATOR, EVAL, AGENT_TOOL
298303
*
299304
* @param self::SOURCE_* $source
300305
*/

src/CustomerEngagementSuite/ConversationLoggingSettings.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ class ConversationLoggingSettings extends \Google\Model
2525
* @var bool
2626
*/
2727
public $disableConversationLogging;
28+
/**
29+
* Optional. Controls the retention window for the conversation. If not set,
30+
* the conversation will be retained for 365 days.
31+
*
32+
* @var string
33+
*/
34+
public $retentionWindow;
2835

2936
/**
3037
* Optional. Whether to disable conversation logging for the sessions.
@@ -42,6 +49,23 @@ public function getDisableConversationLogging()
4249
{
4350
return $this->disableConversationLogging;
4451
}
52+
/**
53+
* Optional. Controls the retention window for the conversation. If not set,
54+
* the conversation will be retained for 365 days.
55+
*
56+
* @param string $retentionWindow
57+
*/
58+
public function setRetentionWindow($retentionWindow)
59+
{
60+
$this->retentionWindow = $retentionWindow;
61+
}
62+
/**
63+
* @return string
64+
*/
65+
public function getRetentionWindow()
66+
{
67+
return $this->retentionWindow;
68+
}
4569
}
4670

4771
// Adding a class alias for backwards compatibility with the previous class name.

src/CustomerEngagementSuite/ErrorHandlingSettings.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,34 @@ class ErrorHandlingSettings extends \Google\Model
3737
* errors).
3838
*/
3939
public const ERROR_HANDLING_STRATEGY_END_SESSION = 'END_SESSION';
40+
protected $endSessionConfigType = ErrorHandlingSettingsEndSessionConfig::class;
41+
protected $endSessionConfigDataType = '';
4042
/**
4143
* Optional. The strategy to use for error handling.
4244
*
4345
* @var string
4446
*/
4547
public $errorHandlingStrategy;
48+
protected $fallbackResponseConfigType = ErrorHandlingSettingsFallbackResponseConfig::class;
49+
protected $fallbackResponseConfigDataType = '';
4650

51+
/**
52+
* Optional. Configuration for ending the session in case of system errors
53+
* (e.g. LLM errors).
54+
*
55+
* @param ErrorHandlingSettingsEndSessionConfig $endSessionConfig
56+
*/
57+
public function setEndSessionConfig(ErrorHandlingSettingsEndSessionConfig $endSessionConfig)
58+
{
59+
$this->endSessionConfig = $endSessionConfig;
60+
}
61+
/**
62+
* @return ErrorHandlingSettingsEndSessionConfig
63+
*/
64+
public function getEndSessionConfig()
65+
{
66+
return $this->endSessionConfig;
67+
}
4768
/**
4869
* Optional. The strategy to use for error handling.
4970
*
@@ -63,6 +84,22 @@ public function getErrorHandlingStrategy()
6384
{
6485
return $this->errorHandlingStrategy;
6586
}
87+
/**
88+
* Optional. Configuration for handling fallback responses.
89+
*
90+
* @param ErrorHandlingSettingsFallbackResponseConfig $fallbackResponseConfig
91+
*/
92+
public function setFallbackResponseConfig(ErrorHandlingSettingsFallbackResponseConfig $fallbackResponseConfig)
93+
{
94+
$this->fallbackResponseConfig = $fallbackResponseConfig;
95+
}
96+
/**
97+
* @return ErrorHandlingSettingsFallbackResponseConfig
98+
*/
99+
public function getFallbackResponseConfig()
100+
{
101+
return $this->fallbackResponseConfig;
102+
}
66103
}
67104

68105
// Adding a class alias for backwards compatibility with the previous class name.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\CustomerEngagementSuite;
19+
20+
class ErrorHandlingSettingsEndSessionConfig extends \Google\Model
21+
{
22+
/**
23+
* Optional. Whether to escalate the session in EndSession. If session is
24+
* escalated, metadata in EndSession will contain `session_escalated = true`.
25+
* See https://docs.cloud.google.com/customer-engagement-ai/conversational-
26+
* agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent
27+
* for details.
28+
*
29+
* @var bool
30+
*/
31+
public $escalateSession;
32+
33+
/**
34+
* Optional. Whether to escalate the session in EndSession. If session is
35+
* escalated, metadata in EndSession will contain `session_escalated = true`.
36+
* See https://docs.cloud.google.com/customer-engagement-ai/conversational-
37+
* agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent
38+
* for details.
39+
*
40+
* @param bool $escalateSession
41+
*/
42+
public function setEscalateSession($escalateSession)
43+
{
44+
$this->escalateSession = $escalateSession;
45+
}
46+
/**
47+
* @return bool
48+
*/
49+
public function getEscalateSession()
50+
{
51+
return $this->escalateSession;
52+
}
53+
}
54+
55+
// Adding a class alias for backwards compatibility with the previous class name.
56+
class_alias(ErrorHandlingSettingsEndSessionConfig::class, 'Google_Service_CustomerEngagementSuite_ErrorHandlingSettingsEndSessionConfig');
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\CustomerEngagementSuite;
19+
20+
class ErrorHandlingSettingsFallbackResponseConfig extends \Google\Model
21+
{
22+
/**
23+
* Optional. The fallback messages in case of system errors (e.g. LLM errors),
24+
* mapped by [supported language code](https://docs.cloud.google.com/customer-
25+
* engagement-ai/conversational-agents/ps/reference/language).
26+
*
27+
* @var string[]
28+
*/
29+
public $customFallbackMessages;
30+
/**
31+
* Optional. The maximum number of fallback attempts to make before the agent
32+
* emitting EndSession Signal.
33+
*
34+
* @var int
35+
*/
36+
public $maxFallbackAttempts;
37+
38+
/**
39+
* Optional. The fallback messages in case of system errors (e.g. LLM errors),
40+
* mapped by [supported language code](https://docs.cloud.google.com/customer-
41+
* engagement-ai/conversational-agents/ps/reference/language).
42+
*
43+
* @param string[] $customFallbackMessages
44+
*/
45+
public function setCustomFallbackMessages($customFallbackMessages)
46+
{
47+
$this->customFallbackMessages = $customFallbackMessages;
48+
}
49+
/**
50+
* @return string[]
51+
*/
52+
public function getCustomFallbackMessages()
53+
{
54+
return $this->customFallbackMessages;
55+
}
56+
/**
57+
* Optional. The maximum number of fallback attempts to make before the agent
58+
* emitting EndSession Signal.
59+
*
60+
* @param int $maxFallbackAttempts
61+
*/
62+
public function setMaxFallbackAttempts($maxFallbackAttempts)
63+
{
64+
$this->maxFallbackAttempts = $maxFallbackAttempts;
65+
}
66+
/**
67+
* @return int
68+
*/
69+
public function getMaxFallbackAttempts()
70+
{
71+
return $this->maxFallbackAttempts;
72+
}
73+
}
74+
75+
// Adding a class alias for backwards compatibility with the previous class name.
76+
class_alias(ErrorHandlingSettingsFallbackResponseConfig::class, 'Google_Service_CustomerEngagementSuite_ErrorHandlingSettingsFallbackResponseConfig');

src/CustomerEngagementSuite/ExecuteToolRequest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class ExecuteToolRequest extends \Google\Model
3434
* @var array[]
3535
*/
3636
public $context;
37+
protected $mockConfigType = MockConfig::class;
38+
protected $mockConfigDataType = '';
3739
/**
3840
* Optional. The name of the tool to execute. Format:
3941
* projects/{project}/locations/{location}/apps/{app}/tools/{tool}
@@ -85,6 +87,24 @@ public function getContext()
8587
{
8688
return $this->context;
8789
}
90+
/**
91+
* Optional. Mock configuration for the tool execution. If this field is set,
92+
* tools that call other tools will be mocked based on the provided patterns
93+
* and responses.
94+
*
95+
* @param MockConfig $mockConfig
96+
*/
97+
public function setMockConfig(MockConfig $mockConfig)
98+
{
99+
$this->mockConfig = $mockConfig;
100+
}
101+
/**
102+
* @return MockConfig
103+
*/
104+
public function getMockConfig()
105+
{
106+
return $this->mockConfig;
107+
}
88108
/**
89109
* Optional. The name of the tool to execute. Format:
90110
* projects/{project}/locations/{location}/apps/{app}/tools/{tool}

0 commit comments

Comments
 (0)