Skip to content

Commit 8540299

Browse files
1 parent b5a7c59 commit 8540299

23 files changed

+1383
-45
lines changed

src/Aiplatform.php

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3234,7 +3234,27 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
32343234
'locations',
32353235
[
32363236
'methods' => [
3237-
'augmentPrompt' => [
3237+
'askContexts' => [
3238+
'path' => 'v1/{+parent}:askContexts',
3239+
'httpMethod' => 'POST',
3240+
'parameters' => [
3241+
'parent' => [
3242+
'location' => 'path',
3243+
'type' => 'string',
3244+
'required' => true,
3245+
],
3246+
],
3247+
],'asyncRetrieveContexts' => [
3248+
'path' => 'v1/{+parent}:asyncRetrieveContexts',
3249+
'httpMethod' => 'POST',
3250+
'parameters' => [
3251+
'parent' => [
3252+
'location' => 'path',
3253+
'type' => 'string',
3254+
'required' => true,
3255+
],
3256+
],
3257+
],'augmentPrompt' => [
32383258
'path' => 'v1/{+parent}:augmentPrompt',
32393259
'httpMethod' => 'POST',
32403260
'parameters' => [
@@ -5266,6 +5286,20 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
52665286
'type' => 'string',
52675287
],
52685288
],
5289+
],'responses' => [
5290+
'path' => 'v1/{+endpoint}/responses',
5291+
'httpMethod' => 'POST',
5292+
'parameters' => [
5293+
'endpoint' => [
5294+
'location' => 'path',
5295+
'type' => 'string',
5296+
'required' => true,
5297+
],
5298+
'deployedModelId' => [
5299+
'location' => 'query',
5300+
'type' => 'string',
5301+
],
5302+
],
52695303
],
52705304
]
52715305
]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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\Aiplatform;
19+
20+
class GoogleCloudAiplatformV1AskContextsRequest extends \Google\Collection
21+
{
22+
protected $collection_key = 'tools';
23+
protected $queryType = GoogleCloudAiplatformV1RagQuery::class;
24+
protected $queryDataType = '';
25+
protected $toolsType = GoogleCloudAiplatformV1Tool::class;
26+
protected $toolsDataType = 'array';
27+
28+
/**
29+
* Required. Single RAG retrieve query.
30+
*
31+
* @param GoogleCloudAiplatformV1RagQuery $query
32+
*/
33+
public function setQuery(GoogleCloudAiplatformV1RagQuery $query)
34+
{
35+
$this->query = $query;
36+
}
37+
/**
38+
* @return GoogleCloudAiplatformV1RagQuery
39+
*/
40+
public function getQuery()
41+
{
42+
return $this->query;
43+
}
44+
/**
45+
* Optional. The tools to use for AskContexts.
46+
*
47+
* @param GoogleCloudAiplatformV1Tool[] $tools
48+
*/
49+
public function setTools($tools)
50+
{
51+
$this->tools = $tools;
52+
}
53+
/**
54+
* @return GoogleCloudAiplatformV1Tool[]
55+
*/
56+
public function getTools()
57+
{
58+
return $this->tools;
59+
}
60+
}
61+
62+
// Adding a class alias for backwards compatibility with the previous class name.
63+
class_alias(GoogleCloudAiplatformV1AskContextsRequest::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1AskContextsRequest');
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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\Aiplatform;
19+
20+
class GoogleCloudAiplatformV1AskContextsResponse extends \Google\Model
21+
{
22+
protected $contextsType = GoogleCloudAiplatformV1RagContexts::class;
23+
protected $contextsDataType = '';
24+
/**
25+
* The Retrieval Response.
26+
*
27+
* @var string
28+
*/
29+
public $response;
30+
31+
/**
32+
* The contexts of the query.
33+
*
34+
* @param GoogleCloudAiplatformV1RagContexts $contexts
35+
*/
36+
public function setContexts(GoogleCloudAiplatformV1RagContexts $contexts)
37+
{
38+
$this->contexts = $contexts;
39+
}
40+
/**
41+
* @return GoogleCloudAiplatformV1RagContexts
42+
*/
43+
public function getContexts()
44+
{
45+
return $this->contexts;
46+
}
47+
/**
48+
* The Retrieval Response.
49+
*
50+
* @param string $response
51+
*/
52+
public function setResponse($response)
53+
{
54+
$this->response = $response;
55+
}
56+
/**
57+
* @return string
58+
*/
59+
public function getResponse()
60+
{
61+
return $this->response;
62+
}
63+
}
64+
65+
// Adding a class alias for backwards compatibility with the previous class name.
66+
class_alias(GoogleCloudAiplatformV1AskContextsResponse::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1AskContextsResponse');
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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\Aiplatform;
19+
20+
class GoogleCloudAiplatformV1AsyncRetrieveContextsRequest extends \Google\Collection
21+
{
22+
protected $collection_key = 'tools';
23+
protected $queryType = GoogleCloudAiplatformV1RagQuery::class;
24+
protected $queryDataType = '';
25+
protected $toolsType = GoogleCloudAiplatformV1Tool::class;
26+
protected $toolsDataType = 'array';
27+
28+
/**
29+
* Required. Single RAG retrieve query.
30+
*
31+
* @param GoogleCloudAiplatformV1RagQuery $query
32+
*/
33+
public function setQuery(GoogleCloudAiplatformV1RagQuery $query)
34+
{
35+
$this->query = $query;
36+
}
37+
/**
38+
* @return GoogleCloudAiplatformV1RagQuery
39+
*/
40+
public function getQuery()
41+
{
42+
return $this->query;
43+
}
44+
/**
45+
* Optional. The tools to use for AskContexts.
46+
*
47+
* @param GoogleCloudAiplatformV1Tool[] $tools
48+
*/
49+
public function setTools($tools)
50+
{
51+
$this->tools = $tools;
52+
}
53+
/**
54+
* @return GoogleCloudAiplatformV1Tool[]
55+
*/
56+
public function getTools()
57+
{
58+
return $this->tools;
59+
}
60+
}
61+
62+
// Adding a class alias for backwards compatibility with the previous class name.
63+
class_alias(GoogleCloudAiplatformV1AsyncRetrieveContextsRequest::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1AsyncRetrieveContextsRequest');

src/Aiplatform/GoogleCloudAiplatformV1EmbedContentRequest.php

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,53 +56,64 @@ class GoogleCloudAiplatformV1EmbedContentRequest extends \Google\Model
5656
*/
5757
public const TASK_TYPE_CODE_RETRIEVAL_QUERY = 'CODE_RETRIEVAL_QUERY';
5858
/**
59-
* Optional. Whether to silently truncate the input content if it's longer
60-
* than the maximum sequence length.
59+
* Optional. Deprecated: Please use EmbedContentConfig.auto_truncate instead.
60+
* Whether to silently truncate the input content if it's longer than the
61+
* maximum sequence length.
6162
*
63+
* @deprecated
6264
* @var bool
6365
*/
6466
public $autoTruncate;
6567
protected $contentType = GoogleCloudAiplatformV1Content::class;
6668
protected $contentDataType = '';
6769
/**
68-
* Optional. Optional reduced dimension for the output embedding. If set,
69-
* excessive values in the output embedding are truncated from the end.
70+
* Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality
71+
* instead. Reduced dimension for the output embedding. If set, excessive
72+
* values in the output embedding are truncated from the end.
7073
*
74+
* @deprecated
7175
* @var int
7276
*/
7377
public $outputDimensionality;
7478
/**
75-
* Optional. The task type of the embedding.
79+
* Optional. Deprecated: Please use EmbedContentConfig.task_type instead. The
80+
* task type of the embedding.
7681
*
82+
* @deprecated
7783
* @var string
7884
*/
7985
public $taskType;
8086
/**
81-
* Optional. An optional title for the text.
87+
* Optional. Deprecated: Please use EmbedContentConfig.title instead. The
88+
* title for the text.
8289
*
90+
* @deprecated
8391
* @var string
8492
*/
8593
public $title;
8694

8795
/**
88-
* Optional. Whether to silently truncate the input content if it's longer
89-
* than the maximum sequence length.
96+
* Optional. Deprecated: Please use EmbedContentConfig.auto_truncate instead.
97+
* Whether to silently truncate the input content if it's longer than the
98+
* maximum sequence length.
9099
*
100+
* @deprecated
91101
* @param bool $autoTruncate
92102
*/
93103
public function setAutoTruncate($autoTruncate)
94104
{
95105
$this->autoTruncate = $autoTruncate;
96106
}
97107
/**
108+
* @deprecated
98109
* @return bool
99110
*/
100111
public function getAutoTruncate()
101112
{
102113
return $this->autoTruncate;
103114
}
104115
/**
105-
* Required. Input content to be embedded. Required.
116+
* Required. The content to be embedded.
106117
*
107118
* @param GoogleCloudAiplatformV1Content $content
108119
*/
@@ -118,52 +129,61 @@ public function getContent()
118129
return $this->content;
119130
}
120131
/**
121-
* Optional. Optional reduced dimension for the output embedding. If set,
122-
* excessive values in the output embedding are truncated from the end.
132+
* Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality
133+
* instead. Reduced dimension for the output embedding. If set, excessive
134+
* values in the output embedding are truncated from the end.
123135
*
136+
* @deprecated
124137
* @param int $outputDimensionality
125138
*/
126139
public function setOutputDimensionality($outputDimensionality)
127140
{
128141
$this->outputDimensionality = $outputDimensionality;
129142
}
130143
/**
144+
* @deprecated
131145
* @return int
132146
*/
133147
public function getOutputDimensionality()
134148
{
135149
return $this->outputDimensionality;
136150
}
137151
/**
138-
* Optional. The task type of the embedding.
152+
* Optional. Deprecated: Please use EmbedContentConfig.task_type instead. The
153+
* task type of the embedding.
139154
*
140155
* Accepted values: UNSPECIFIED, RETRIEVAL_QUERY, RETRIEVAL_DOCUMENT,
141156
* SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, QUESTION_ANSWERING,
142157
* FACT_VERIFICATION, CODE_RETRIEVAL_QUERY
143158
*
159+
* @deprecated
144160
* @param self::TASK_TYPE_* $taskType
145161
*/
146162
public function setTaskType($taskType)
147163
{
148164
$this->taskType = $taskType;
149165
}
150166
/**
167+
* @deprecated
151168
* @return self::TASK_TYPE_*
152169
*/
153170
public function getTaskType()
154171
{
155172
return $this->taskType;
156173
}
157174
/**
158-
* Optional. An optional title for the text.
175+
* Optional. Deprecated: Please use EmbedContentConfig.title instead. The
176+
* title for the text.
159177
*
178+
* @deprecated
160179
* @param string $title
161180
*/
162181
public function setTitle($title)
163182
{
164183
$this->title = $title;
165184
}
166185
/**
186+
* @deprecated
167187
* @return string
168188
*/
169189
public function getTitle()

src/Aiplatform/GoogleCloudAiplatformV1EmbedContentResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getTruncated()
6363
return $this->truncated;
6464
}
6565
/**
66-
* Metadata about the response(s).
66+
* Usage metadata about the response(s).
6767
*
6868
* @param GoogleCloudAiplatformV1UsageMetadata $usageMetadata
6969
*/

0 commit comments

Comments
 (0)