Skip to content

Commit 860728d

Browse files
1 parent d0b40ac commit 860728d

File tree

49 files changed

+3377
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3377
-161
lines changed

src/Aiplatform.php

Lines changed: 534 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 GoogleCloudAiplatformV1EvaluationParserConfig extends \Google\Model
21+
{
22+
protected $customCodeParserConfigType = GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig::class;
23+
protected $customCodeParserConfigDataType = '';
24+
25+
/**
26+
* Optional. Use custom code to parse the LLM response.
27+
*
28+
* @param GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig $customCodeParserConfig
29+
*/
30+
public function setCustomCodeParserConfig(GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig $customCodeParserConfig)
31+
{
32+
$this->customCodeParserConfig = $customCodeParserConfig;
33+
}
34+
/**
35+
* @return GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig
36+
*/
37+
public function getCustomCodeParserConfig()
38+
{
39+
return $this->customCodeParserConfig;
40+
}
41+
}
42+
43+
// Adding a class alias for backwards compatibility with the previous class name.
44+
class_alias(GoogleCloudAiplatformV1EvaluationParserConfig::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1EvaluationParserConfig');
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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 GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig extends \Google\Model
21+
{
22+
/**
23+
* Required. Python function for parsing results. The function should be
24+
* defined within this string. The function takes a list of strings (LLM
25+
* responses) and should return either a list of dictionaries (for rubrics) or
26+
* a single dictionary (for a metric result). Example function signature: def
27+
* parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]: When
28+
* parsing rubrics, return a list of dictionaries, where each dictionary
29+
* represents a Rubric. Example for rubrics: [ { "content": {"property":
30+
* {"description": "The response is factual."}}, "type": "FACTUALITY",
31+
* "importance": "HIGH" }, { "content": {"property": {"description": "The
32+
* response is fluent."}}, "type": "FLUENCY", "importance": "MEDIUM" } ] When
33+
* parsing critique results, return a dictionary representing a MetricResult.
34+
* Example for a metric result: { "score": 0.8, "explanation": "The model
35+
* followed most instructions.", "rubric_verdicts": [...] } ... code for
36+
* result extraction and aggregation
37+
*
38+
* @var string
39+
*/
40+
public $parsingFunction;
41+
42+
/**
43+
* Required. Python function for parsing results. The function should be
44+
* defined within this string. The function takes a list of strings (LLM
45+
* responses) and should return either a list of dictionaries (for rubrics) or
46+
* a single dictionary (for a metric result). Example function signature: def
47+
* parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]: When
48+
* parsing rubrics, return a list of dictionaries, where each dictionary
49+
* represents a Rubric. Example for rubrics: [ { "content": {"property":
50+
* {"description": "The response is factual."}}, "type": "FACTUALITY",
51+
* "importance": "HIGH" }, { "content": {"property": {"description": "The
52+
* response is fluent."}}, "type": "FLUENCY", "importance": "MEDIUM" } ] When
53+
* parsing critique results, return a dictionary representing a MetricResult.
54+
* Example for a metric result: { "score": 0.8, "explanation": "The model
55+
* followed most instructions.", "rubric_verdicts": [...] } ... code for
56+
* result extraction and aggregation
57+
*
58+
* @param string $parsingFunction
59+
*/
60+
public function setParsingFunction($parsingFunction)
61+
{
62+
$this->parsingFunction = $parsingFunction;
63+
}
64+
/**
65+
* @return string
66+
*/
67+
public function getParsingFunction()
68+
{
69+
return $this->parsingFunction;
70+
}
71+
}
72+
73+
// Adding a class alias for backwards compatibility with the previous class name.
74+
class_alias(GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig');

src/Aiplatform/GoogleCloudAiplatformV1EvaluationRunInferenceConfig.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ class GoogleCloudAiplatformV1EvaluationRunInferenceConfig extends \Google\Model
3737
* @var string
3838
*/
3939
public $model;
40+
/**
41+
* Optional. The parallelism of the evaluation run for the inference step. If
42+
* not specified, the default parallelism will be used.
43+
*
44+
* @var int
45+
*/
46+
public $parallelism;
4047

4148
/**
4249
* Optional. Agent run config.
@@ -94,6 +101,23 @@ public function getModel()
94101
{
95102
return $this->model;
96103
}
104+
/**
105+
* Optional. The parallelism of the evaluation run for the inference step. If
106+
* not specified, the default parallelism will be used.
107+
*
108+
* @param int $parallelism
109+
*/
110+
public function setParallelism($parallelism)
111+
{
112+
$this->parallelism = $parallelism;
113+
}
114+
/**
115+
* @return int
116+
*/
117+
public function getParallelism()
118+
{
119+
return $this->parallelism;
120+
}
97121
}
98122

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

src/Aiplatform/GoogleCloudAiplatformV1GenerateMemoriesRequest.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace Google\Service\Aiplatform;
1919

20-
class GoogleCloudAiplatformV1GenerateMemoriesRequest extends \Google\Model
20+
class GoogleCloudAiplatformV1GenerateMemoriesRequest extends \Google\Collection
2121
{
2222
/**
2323
* Unspecified metadata merge strategy. If unspecified, the default behavior
@@ -39,6 +39,9 @@ class GoogleCloudAiplatformV1GenerateMemoriesRequest extends \Google\Model
3939
* for consolidation.
4040
*/
4141
public const METADATA_MERGE_STRATEGY_REQUIRE_EXACT_MATCH = 'REQUIRE_EXACT_MATCH';
42+
protected $collection_key = 'allowedTopics';
43+
protected $allowedTopicsType = GoogleCloudAiplatformV1MemoryTopicId::class;
44+
protected $allowedTopicsDataType = 'array';
4245
protected $directContentsSourceType = GoogleCloudAiplatformV1GenerateMemoriesRequestDirectContentsSource::class;
4346
protected $directContentsSourceDataType = '';
4447
protected $directMemoriesSourceType = GoogleCloudAiplatformV1GenerateMemoriesRequestDirectMemoriesSource::class;
@@ -100,6 +103,22 @@ class GoogleCloudAiplatformV1GenerateMemoriesRequest extends \Google\Model
100103
protected $vertexSessionSourceType = GoogleCloudAiplatformV1GenerateMemoriesRequestVertexSessionSource::class;
101104
protected $vertexSessionSourceDataType = '';
102105

106+
/**
107+
* Optional. Restricts memory generation to a subset of memory topics.
108+
*
109+
* @param GoogleCloudAiplatformV1MemoryTopicId[] $allowedTopics
110+
*/
111+
public function setAllowedTopics($allowedTopics)
112+
{
113+
$this->allowedTopics = $allowedTopics;
114+
}
115+
/**
116+
* @return GoogleCloudAiplatformV1MemoryTopicId[]
117+
*/
118+
public function getAllowedTopics()
119+
{
120+
return $this->allowedTopics;
121+
}
103122
/**
104123
* Defines a direct source of content as the source content from which to
105124
* generate memories.

src/Aiplatform/GoogleCloudAiplatformV1IntermediateExtractedMemory.php

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,44 @@
2020
class GoogleCloudAiplatformV1IntermediateExtractedMemory extends \Google\Model
2121
{
2222
/**
23-
* Output only. The fact of the extracted memory.
23+
* Output only. Represents the explanation of why the information was
24+
* extracted from the source content.
25+
*
26+
* @var string
27+
*/
28+
public $context;
29+
/**
30+
* Output only. Represents the fact of the extracted memory.
2431
*
2532
* @var string
2633
*/
2734
public $fact;
35+
/**
36+
* Output only. Represents the structured value of the extracted memory.
37+
*
38+
* @var array[]
39+
*/
40+
public $structuredData;
2841

2942
/**
30-
* Output only. The fact of the extracted memory.
43+
* Output only. Represents the explanation of why the information was
44+
* extracted from the source content.
45+
*
46+
* @param string $context
47+
*/
48+
public function setContext($context)
49+
{
50+
$this->context = $context;
51+
}
52+
/**
53+
* @return string
54+
*/
55+
public function getContext()
56+
{
57+
return $this->context;
58+
}
59+
/**
60+
* Output only. Represents the fact of the extracted memory.
3161
*
3262
* @param string $fact
3363
*/
@@ -42,6 +72,22 @@ public function getFact()
4272
{
4373
return $this->fact;
4474
}
75+
/**
76+
* Output only. Represents the structured value of the extracted memory.
77+
*
78+
* @param array[] $structuredData
79+
*/
80+
public function setStructuredData($structuredData)
81+
{
82+
$this->structuredData = $structuredData;
83+
}
84+
/**
85+
* @return array[]
86+
*/
87+
public function getStructuredData()
88+
{
89+
return $this->structuredData;
90+
}
4591
}
4692

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

src/Aiplatform/GoogleCloudAiplatformV1LLMBasedMetricSpec.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class GoogleCloudAiplatformV1LLMBasedMetricSpec extends \Google\Model
3535
public $metricPromptTemplate;
3636
protected $predefinedRubricGenerationSpecType = GoogleCloudAiplatformV1PredefinedMetricSpec::class;
3737
protected $predefinedRubricGenerationSpecDataType = '';
38+
protected $resultParserConfigType = GoogleCloudAiplatformV1EvaluationParserConfig::class;
39+
protected $resultParserConfigDataType = '';
3840
protected $rubricGenerationSpecType = GoogleCloudAiplatformV1RubricGenerationSpec::class;
3941
protected $rubricGenerationSpecDataType = '';
4042
/**
@@ -115,6 +117,22 @@ public function getPredefinedRubricGenerationSpec()
115117
{
116118
return $this->predefinedRubricGenerationSpec;
117119
}
120+
/**
121+
* Optional. The parser config for the metric result.
122+
*
123+
* @param GoogleCloudAiplatformV1EvaluationParserConfig $resultParserConfig
124+
*/
125+
public function setResultParserConfig(GoogleCloudAiplatformV1EvaluationParserConfig $resultParserConfig)
126+
{
127+
$this->resultParserConfig = $resultParserConfig;
128+
}
129+
/**
130+
* @return GoogleCloudAiplatformV1EvaluationParserConfig
131+
*/
132+
public function getResultParserConfig()
133+
{
134+
return $this->resultParserConfig;
135+
}
118136
/**
119137
* Dynamically generate rubrics using this specification.
120138
*
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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 GoogleCloudAiplatformV1ListSandboxEnvironmentSnapshotsResponse extends \Google\Collection
21+
{
22+
protected $collection_key = 'sandboxEnvironmentSnapshots';
23+
/**
24+
* A token, which can be sent as
25+
* ListSandboxEnvironmentSnapshotsRequest.page_token to retrieve the next
26+
* page. Absence of this field indicates there are no subsequent pages.
27+
*
28+
* @var string
29+
*/
30+
public $nextPageToken;
31+
protected $sandboxEnvironmentSnapshotsType = GoogleCloudAiplatformV1SandboxEnvironmentSnapshot::class;
32+
protected $sandboxEnvironmentSnapshotsDataType = 'array';
33+
34+
/**
35+
* A token, which can be sent as
36+
* ListSandboxEnvironmentSnapshotsRequest.page_token to retrieve the next
37+
* page. Absence of this field indicates there are no subsequent pages.
38+
*
39+
* @param string $nextPageToken
40+
*/
41+
public function setNextPageToken($nextPageToken)
42+
{
43+
$this->nextPageToken = $nextPageToken;
44+
}
45+
/**
46+
* @return string
47+
*/
48+
public function getNextPageToken()
49+
{
50+
return $this->nextPageToken;
51+
}
52+
/**
53+
* The SandboxEnvironmentSnapshots matching the request.
54+
*
55+
* @param GoogleCloudAiplatformV1SandboxEnvironmentSnapshot[] $sandboxEnvironmentSnapshots
56+
*/
57+
public function setSandboxEnvironmentSnapshots($sandboxEnvironmentSnapshots)
58+
{
59+
$this->sandboxEnvironmentSnapshots = $sandboxEnvironmentSnapshots;
60+
}
61+
/**
62+
* @return GoogleCloudAiplatformV1SandboxEnvironmentSnapshot[]
63+
*/
64+
public function getSandboxEnvironmentSnapshots()
65+
{
66+
return $this->sandboxEnvironmentSnapshots;
67+
}
68+
}
69+
70+
// Adding a class alias for backwards compatibility with the previous class name.
71+
class_alias(GoogleCloudAiplatformV1ListSandboxEnvironmentSnapshotsResponse::class, 'Google_Service_Aiplatform_GoogleCloudAiplatformV1ListSandboxEnvironmentSnapshotsResponse');

0 commit comments

Comments
 (0)