Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,21 @@ class TaskType(proto.Enum):
CLUSTERING (5):
Specifies that the embeddings will be used
for clustering.
QUESTION_ANSWERING (6):
Specifies that the given text will be used
for question answering.
FACT_VERIFICATION (7):
Specifies that the given text will be used
for fact verification.
"""
TASK_TYPE_UNSPECIFIED = 0
RETRIEVAL_QUERY = 1
RETRIEVAL_DOCUMENT = 2
SEMANTIC_SIMILARITY = 3
CLASSIFICATION = 4
CLUSTERING = 5
QUESTION_ANSWERING = 6
FACT_VERIFICATION = 7


class GenerateContentRequest(proto.Message):
Expand Down Expand Up @@ -212,7 +220,7 @@ class GenerationConfig(proto.Message):
``Model.temperature`` attribute of the ``Model`` returned
from the ``getModel`` function.

Values can range from [0.0, infinity).
Values can range from [0.0, 2.0].

This field is a member of `oneof`_ ``_temperature``.
top_p (float):
Expand All @@ -236,16 +244,23 @@ class GenerationConfig(proto.Message):
Optional. The maximum number of tokens to consider when
sampling.

The model uses combined Top-k and nucleus sampling.

Top-k sampling considers the set of ``top_k`` most probable
tokens.
Models use nucleus sampling or combined Top-k and nucleus
sampling. Top-k sampling considers the set of ``top_k`` most
probable tokens. Models running with nucleus sampling don't
allow top_k setting.

Note: The default value varies by model, see the
``Model.top_k`` attribute of the ``Model`` returned from the
``getModel`` function.
``getModel`` function. Empty ``top_k`` field in ``Model``
indicates the model doesn't apply top-k sampling and doesn't
allow setting ``top_k`` on requests.

This field is a member of `oneof`_ ``_top_k``.
response_mime_type (str):
Optional. Output response mimetype of the generated
candidate text. Supported mimetype: ``text/plain``:
(default) Text output. ``application/json``: JSON response
in the candidates.
"""

candidate_count: int = proto.Field(
Expand Down Expand Up @@ -277,6 +292,10 @@ class GenerationConfig(proto.Message):
number=7,
optional=True,
)
response_mime_type: str = proto.Field(
proto.STRING,
number=13,
)


class SemanticRetrieverConfig(proto.Message):
Expand Down Expand Up @@ -896,6 +915,13 @@ class EmbedContentRequest(proto.Message):
provides better quality embeddings for retrieval.

This field is a member of `oneof`_ ``_title``.
output_dimensionality (int):
Optional. Optional reduced dimension for the output
embedding. If set, excessive values in the output embedding
are truncated from the end. Supported by
``models/text-embedding-latest``.

This field is a member of `oneof`_ ``_output_dimensionality``.
"""

model: str = proto.Field(
Expand All @@ -918,6 +944,11 @@ class EmbedContentRequest(proto.Message):
number=4,
optional=True,
)
output_dimensionality: int = proto.Field(
proto.INT32,
number=5,
optional=True,
)


class ContentEmbedding(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class Model(proto.Message):

Top-k sampling considers the set of ``top_k`` most probable
tokens. This value specifies default to be used by the
backend while making the call to the model.
backend while making the call to the model. If empty,
indicates the model doesn't use top-k sampling, and
``top_k`` isn't allowed as a generation parameter.

This field is a member of `oneof`_ ``_top_k``.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.6.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.6.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.6.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.6.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class generativelanguageCallTransformer(cst.CSTTransformer):
'delete_file': ('name', ),
'delete_permission': ('name', ),
'delete_tuned_model': ('name', ),
'embed_content': ('model', 'content', 'task_type', 'title', ),
'embed_content': ('model', 'content', 'task_type', 'title', 'output_dimensionality', ),
'embed_text': ('model', 'text', ),
'generate_answer': ('model', 'contents', 'answer_style', 'inline_passages', 'semantic_retriever', 'safety_settings', 'temperature', ),
'generate_content': ('model', 'contents', 'system_instruction', 'tools', 'tool_config', 'safety_settings', 'generation_config', ),
Expand Down