GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Copybara import of the project: · smbale/python-aiplatform@688f1b9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google/cloud
    • aiplatform_v1beta1
      • __init__.py
      • services/prediction_service
        • async_client.py
        • client.py
      • types
        • __init__.py
        • content.py
        • index_endpoint.py
        • openapi.py
        • pipeline_job.py
        • prediction_service.py
        • service_networking.py
        • ui_pipeline_spec.py
    • aiplatform_v1
      • __init__.py
      • types
        • __init__.py
        • content.py
        • openapi.py
        • prediction_service.py
  • samples/generated_samples
    • snippet_metadata_google.cloud.aiplatform.v1.json
    • snippet_metadata_google.cloud.aiplatform.v1beta1.json
  • tests/unit/gapic
    • aiplatform_v1beta1
      • test_extension_registry_service.py
      • test_gen_ai_cache_service.py
      • test_index_endpoint_service.py
      • test_pipeline_service.py
      • test_prediction_service.py
      • test_schedule_service.py
    • aiplatform_v1
      • test_prediction_service.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/cloud/aiplatform_v1/__init__.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
from .types.content import GroundingChunk
102102
from .types.content import GroundingMetadata
103103
from .types.content import GroundingSupport
104+
from .types.content import LogprobsResult
104105
from .types.content import Part
105106
from .types.content import SafetyRating
106107
from .types.content import SafetySetting
@@ -1423,6 +1424,7 @@
14231424
"ListTuningJobsRequest",
14241425
"ListTuningJobsResponse",
14251426
"LlmUtilityServiceClient",
1427+
"LogprobsResult",
14261428
"LookupStudyRequest",
14271429
"MachineSpec",
14281430
"ManualBatchTuningParameters",
Collapse file

‎google/cloud/aiplatform_v1/types/__init__.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/types/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
GroundingChunk,
4343
GroundingMetadata,
4444
GroundingSupport,
45+
LogprobsResult,
4546
Part,
4647
SafetyRating,
4748
SafetySetting,
@@ -1060,6 +1061,7 @@
10601061
"GroundingChunk",
10611062
"GroundingMetadata",
10621063
"GroundingSupport",
1064+
"LogprobsResult",
10631065
"Part",
10641066
"SafetyRating",
10651067
"SafetySetting",
Collapse file

‎google/cloud/aiplatform_v1/types/content.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/types/content.py
+105Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"CitationMetadata",
4141
"Citation",
4242
"Candidate",
43+
"LogprobsResult",
4344
"Segment",
4445
"GroundingChunk",
4546
"GroundingSupport",
@@ -64,12 +65,15 @@ class HarmCategory(proto.Enum):
6465
HARM_CATEGORY_SEXUALLY_EXPLICIT (4):
6566
The harm category is sexually explicit
6667
content.
68+
HARM_CATEGORY_CIVIC_INTEGRITY (5):
69+
The harm category is civic integrity.
6770
"""
6871
HARM_CATEGORY_UNSPECIFIED = 0
6972
HARM_CATEGORY_HATE_SPEECH = 1
7073
HARM_CATEGORY_DANGEROUS_CONTENT = 2
7174
HARM_CATEGORY_HARASSMENT = 3
7275
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4
76+
HARM_CATEGORY_CIVIC_INTEGRITY = 5
7377

7478

7579
class Content(proto.Message):
@@ -294,6 +298,15 @@ class GenerationConfig(proto.Message):
294298
This field is a member of `oneof`_ ``_max_output_tokens``.
295299
stop_sequences (MutableSequence[str]):
296300
Optional. Stop sequences.
301+
response_logprobs (bool):
302+
Optional. If true, export the logprobs
303+
results in response.
304+
305+
This field is a member of `oneof`_ ``_response_logprobs``.
306+
logprobs (int):
307+
Optional. Logit probabilities.
308+
309+
This field is a member of `oneof`_ ``_logprobs``.
297310
presence_penalty (float):
298311
Optional. Positive penalties.
299312
@@ -457,6 +470,16 @@ class ManualRoutingMode(proto.Message):
457470
proto.STRING,
458471
number=6,
459472
)
473+
response_logprobs: bool = proto.Field(
474+
proto.BOOL,
475+
number=18,
476+
optional=True,
477+
)
478+
logprobs: int = proto.Field(
479+
proto.INT32,
480+
number=7,
481+
optional=True,
482+
)
460483
presence_penalty: float = proto.Field(
461484
proto.FLOAT,
462485
number=8,
@@ -734,6 +757,9 @@ class Candidate(proto.Message):
734757
avg_logprobs (float):
735758
Output only. Average log probability score of
736759
the candidate.
760+
logprobs_result (google.cloud.aiplatform_v1.types.LogprobsResult):
761+
Output only. Log-likelihood scores for the
762+
response tokens and top tokens
737763
finish_reason (google.cloud.aiplatform_v1.types.Candidate.FinishReason):
738764
Output only. The reason why the model stopped
739765
generating tokens. If empty, the model has not
@@ -822,6 +848,11 @@ class FinishReason(proto.Enum):
822848
proto.DOUBLE,
823849
number=9,
824850
)
851+
logprobs_result: "LogprobsResult" = proto.Field(
852+
proto.MESSAGE,
853+
number=10,
854+
message="LogprobsResult",
855+
)
825856
finish_reason: FinishReason = proto.Field(
826857
proto.ENUM,
827858
number=3,
@@ -849,6 +880,80 @@ class FinishReason(proto.Enum):
849880
)
850881

851882

883+
class LogprobsResult(proto.Message):
884+
r"""Logprobs Result
885+
886+
Attributes:
887+
top_candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.TopCandidates]):
888+
Length = total number of decoding steps.
889+
chosen_candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.Candidate]):
890+
Length = total number of decoding steps. The chosen
891+
candidates may or may not be in top_candidates.
892+
"""
893+
894+
class Candidate(proto.Message):
895+
r"""Candidate for the logprobs token and score.
896+
897+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
898+
899+
Attributes:
900+
token (str):
901+
The candidate’s token string value.
902+
903+
This field is a member of `oneof`_ ``_token``.
904+
token_id (int):
905+
The candidate’s token id value.
906+
907+
This field is a member of `oneof`_ ``_token_id``.
908+
log_probability (float):
909+
The candidate's log probability.
910+
911+
This field is a member of `oneof`_ ``_log_probability``.
912+
"""
913+
914+
token: str = proto.Field(
915+
proto.STRING,
916+
number=1,
917+
optional=True,
918+
)
919+
token_id: int = proto.Field(
920+
proto.INT32,
921+
number=3,
922+
optional=True,
923+
)
924+
log_probability: float = proto.Field(
925+
proto.FLOAT,
926+
number=2,
927+
optional=True,
928+
)
929+
930+
class TopCandidates(proto.Message):
931+
r"""Candidates with top log probabilities at each decoding step.
932+
933+
Attributes:
934+
candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.Candidate]):
935+
Sorted by log probability in descending
936+
order.
937+
"""
938+
939+
candidates: MutableSequence["LogprobsResult.Candidate"] = proto.RepeatedField(
940+
proto.MESSAGE,
941+
number=1,
942+
message="LogprobsResult.Candidate",
943+
)
944+
945+
top_candidates: MutableSequence[TopCandidates] = proto.RepeatedField(
946+
proto.MESSAGE,
947+
number=1,
948+
message=TopCandidates,
949+
)
950+
chosen_candidates: MutableSequence[Candidate] = proto.RepeatedField(
951+
proto.MESSAGE,
952+
number=2,
953+
message=Candidate,
954+
)
955+
956+
852957
class Segment(proto.Message):
853958
r"""Segment of the content.
854959
Collapse file

‎google/cloud/aiplatform_v1/types/openapi.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/types/openapi.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ class Schema(proto.Message):
131131
example (google.protobuf.struct_pb2.Value):
132132
Optional. Example of the object. Will only
133133
populated when the object is the root.
134+
any_of (MutableSequence[google.cloud.aiplatform_v1.types.Schema]):
135+
Optional. The value should be validated
136+
against any (one or more) of the subschemas in
137+
the list.
134138
"""
135139

136140
type_: "Type" = proto.Field(
@@ -223,6 +227,11 @@ class Schema(proto.Message):
223227
number=4,
224228
message=struct_pb2.Value,
225229
)
230+
any_of: MutableSequence["Schema"] = proto.RepeatedField(
231+
proto.MESSAGE,
232+
number=11,
233+
message="Schema",
234+
)
226235

227236

228237
__all__ = tuple(sorted(__protobuf__.manifest))
Collapse file

‎google/cloud/aiplatform_v1/types/prediction_service.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/types/prediction_service.py
+36-1Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,11 @@ class CountTokensRequest(proto.Message):
709709
A ``Tool`` is a piece of code that enables the system to
710710
interact with external systems to perform an action, or set
711711
of actions, outside of knowledge and scope of the model.
712+
generation_config (google.cloud.aiplatform_v1.types.GenerationConfig):
713+
Optional. Generation config that the model
714+
will use to generate the response.
715+
716+
This field is a member of `oneof`_ ``_generation_config``.
712717
"""
713718

714719
endpoint: str = proto.Field(
@@ -740,6 +745,12 @@ class CountTokensRequest(proto.Message):
740745
number=6,
741746
message=tool.Tool,
742747
)
748+
generation_config: content.GenerationConfig = proto.Field(
749+
proto.MESSAGE,
750+
number=7,
751+
optional=True,
752+
message=content.GenerationConfig,
753+
)
743754

744755

745756
class CountTokensResponse(proto.Message):
@@ -803,6 +814,17 @@ class GenerateContentRequest(proto.Message):
803814
tool_config (google.cloud.aiplatform_v1.types.ToolConfig):
804815
Optional. Tool config. This config is shared
805816
for all tools provided in the request.
817+
labels (MutableMapping[str, str]):
818+
Optional. The labels with user-defined
819+
metadata for the request. It is used for billing
820+
and reporting only.
821+
822+
Label keys and values can be no longer than 63
823+
characters (Unicode codepoints) and can only
824+
contain lowercase letters, numeric characters,
825+
underscores, and dashes. International
826+
characters are allowed. Label values are
827+
optional. Label keys must start with a letter.
806828
safety_settings (MutableSequence[google.cloud.aiplatform_v1.types.SafetySetting]):
807829
Optional. Per request settings for blocking
808830
unsafe content. Enforced on
@@ -836,6 +858,11 @@ class GenerateContentRequest(proto.Message):
836858
number=7,
837859
message=tool.ToolConfig,
838860
)
861+
labels: MutableMapping[str, str] = proto.MapField(
862+
proto.STRING,
863+
proto.STRING,
864+
number=10,
865+
)
839866
safety_settings: MutableSequence[content.SafetySetting] = proto.RepeatedField(
840867
proto.MESSAGE,
841868
number=3,
@@ -854,6 +881,9 @@ class GenerateContentResponse(proto.Message):
854881
Attributes:
855882
candidates (MutableSequence[google.cloud.aiplatform_v1.types.Candidate]):
856883
Output only. Generated candidates.
884+
model_version (str):
885+
Output only. The model version used to
886+
generate the response.
857887
prompt_feedback (google.cloud.aiplatform_v1.types.GenerateContentResponse.PromptFeedback):
858888
Output only. Content filter results for a
859889
prompt sent in the request. Note: Sent only in
@@ -926,7 +956,8 @@ class UsageMetadata(proto.Message):
926956
candidates_token_count (int):
927957
Number of tokens in the response(s).
928958
total_token_count (int):
929-
959+
Total token count for prompt and response
960+
candidates.
930961
"""
931962

932963
prompt_token_count: int = proto.Field(
@@ -947,6 +978,10 @@ class UsageMetadata(proto.Message):
947978
number=2,
948979
message=content.Candidate,
949980
)
981+
model_version: str = proto.Field(
982+
proto.STRING,
983+
number=11,
984+
)
950985
prompt_feedback: PromptFeedback = proto.Field(
951986
proto.MESSAGE,
952987
number=3,
Collapse file

‎google/cloud/aiplatform_v1beta1/__init__.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1beta1/__init__.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
from .types.content import GroundingChunk
124124
from .types.content import GroundingMetadata
125125
from .types.content import GroundingSupport
126+
from .types.content import LogprobsResult
126127
from .types.content import Part
127128
from .types.content import SafetyRating
128129
from .types.content import SafetySetting
@@ -822,6 +823,7 @@
822823
from .types.pipeline_job import PipelineJobDetail
823824
from .types.pipeline_job import PipelineTaskDetail
824825
from .types.pipeline_job import PipelineTaskExecutorDetail
826+
from .types.pipeline_job import PipelineTaskRerunConfig
825827
from .types.pipeline_job import PipelineTemplateMetadata
826828
from .types.pipeline_service import BatchCancelPipelineJobsOperationMetadata
827829
from .types.pipeline_service import BatchCancelPipelineJobsRequest
@@ -893,6 +895,7 @@
893895
from .types.schedule_service import UpdateScheduleRequest
894896
from .types.service_networking import PrivateServiceConnectConfig
895897
from .types.service_networking import PscAutomatedEndpoints
898+
from .types.service_networking import PSCAutomationConfig
896899
from .types.service_networking import PscInterfaceConfig
897900
from .types.specialist_pool import SpecialistPool
898901
from .types.specialist_pool_service import CreateSpecialistPoolOperationMetadata
@@ -1000,6 +1003,8 @@
10001003
from .types.types import Int64Array
10011004
from .types.types import StringArray
10021005
from .types.types import Tensor
1006+
from .types.ui_pipeline_spec import ArtifactTypeSchema
1007+
from .types.ui_pipeline_spec import RuntimeArtifact
10031008
from .types.unmanaged_container_model import UnmanagedContainerModel
10041009
from .types.user_action_reference import UserActionReference
10051010
from .types.value import Value
@@ -1106,6 +1111,7 @@
11061111
"AnnotationSpec",
11071112
"ApiAuth",
11081113
"Artifact",
1114+
"ArtifactTypeSchema",
11091115
"AssignNotebookRuntimeOperationMetadata",
11101116
"AssignNotebookRuntimeRequest",
11111117
"Attribution",
@@ -1644,6 +1650,7 @@
16441650
"ListTuningJobsRequest",
16451651
"ListTuningJobsResponse",
16461652
"LlmUtilityServiceClient",
1653+
"LogprobsResult",
16471654
"LookupStudyRequest",
16481655
"MachineSpec",
16491656
"ManualBatchTuningParameters",
@@ -1717,6 +1724,7 @@
17171724
"NotebookRuntimeTemplateRef",
17181725
"NotebookRuntimeType",
17191726
"NotebookServiceClient",
1727+
"PSCAutomationConfig",
17201728
"PairwiseChoice",
17211729
"PairwiseMetricInput",
17221730
"PairwiseMetricInstance",
@@ -1743,6 +1751,7 @@
17431751
"PipelineState",
17441752
"PipelineTaskDetail",
17451753
"PipelineTaskExecutorDetail",
1754+
"PipelineTaskRerunConfig",
17461755
"PipelineTemplateMetadata",
17471756
"PointwiseMetricInput",
17481757
"PointwiseMetricInstance",
@@ -1851,6 +1860,7 @@
18511860
"RougeMetricValue",
18521861
"RougeResults",
18531862
"RougeSpec",
1863+
"RuntimeArtifact",
18541864
"RuntimeConfig",
18551865
"SafetyInput",
18561866
"SafetyInstance",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.