Skip to content

Commit

Permalink
Merge branch 'main' into erick/genai-update-standard-tests-library
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin authored Jan 23, 2025
2 parents 48152ec + 953879d commit 92fff46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions libs/vertexai/langchain_google_vertexai/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def validate_params_base(cls, values: dict) -> Any:
if values.get("client_cert_source"):
client_options.client_cert_source = values["client_cert_source"]
values["client_options"] = client_options
additional_headers = values.get("additional_headers", {})
additional_headers = values.get("additional_headers") or {}
values["default_metadata"] = tuple(additional_headers.items())
return values

Expand Down Expand Up @@ -177,7 +177,7 @@ def _library_version(self) -> str:

class _VertexAICommon(_VertexAIBase):
client_preview: Any = Field(default=None, exclude=True) #: :meta private:
model_name: str = Field(default=None, alias="model")
model_name: Optional[str] = Field(default=None, alias="model")
"Underlying model name."
temperature: Optional[float] = None
"Sampling temperature, it controls the degree of randomness in token selection."
Expand Down
2 changes: 1 addition & 1 deletion libs/vertexai/langchain_google_vertexai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ class Joke(BaseModel):
.. code-block:: python
'The image is of five blueberry scones arranged on a piece of baking paper. \n\nHere is a list of what is in the picture:\n* **Five blueberry scones:** They are scattered across the parchment paper, dusted with powdered sugar. \n* **Two cups of coffee:** Two white cups with saucers. One appears full, the other partially drunk.\n* **A bowl of blueberries:** A brown bowl is filled with fresh blueberries, placed near the scones.\n* **A spoon:** A silver spoon with the words "Let\'s Jam" rests on the paper.\n* **Pink peonies:** Several pink peonies lie beside the scones, adding a touch of color.\n* **Baking paper:** The scones, cups, bowl, and spoon are arranged on a piece of white baking paper, splattered with purple. The paper is crinkled and sits on a dark surface. \n\nThe image has a rustic and delicious feel, suggesting a cozy and enjoyable breakfast or brunch setting. \n'
'The image is of five blueberry scones arranged on a piece of baking paper. \n\nHere is a list of what is in the picture:\n* **Five blueberry scones:** They are scattered across the parchment paper, dusted with powdered sugar. \n* **Two cups of coffee:** Two white cups with saucers. One appears full, the other partially drunk.\n* **A bowl of blueberries:** A brown bowl is filled with fresh blueberries, placed near the scones.\n* **A spoon:** A silver spoon with the words "Let\'s Jam" rests on the paper.\n* **Pink peonies:** Several pink peonies lie beside the scones, adding a touch of color.\n* **Baking paper:** The scones, cups, bowl, and spoon are arranged on a piece of white baking paper, splattered with purple. The paper is crinkled and sits on a dark surface. \n\nThe image has a rustic and delicious feel, suggesting a cozy and enjoyable breakfast or brunch setting. \n' # codespell:ignore brunch
Video input:
**NOTE**: Currently only supported for ``gemini-...-vision`` models.
Expand Down
2 changes: 0 additions & 2 deletions libs/vertexai/langchain_google_vertexai/model_garden.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ async def _agenerate(

class ChatAnthropicVertex(_VertexAICommon, BaseChatModel):
async_client: Any = Field(default=None, exclude=True) #: :meta private:
model_name: Optional[str] = Field(default=None, alias="model") # type: ignore[assignment]
"Underlying model name."
max_output_tokens: int = Field(default=1024, alias="max_tokens")
access_token: Optional[str] = None
stream_usage: bool = True # Whether to include usage metadata in streaming output
Expand Down

0 comments on commit 92fff46

Please sign in to comment.